Docsity

Programming Fundamentals Class Participation, Assignments of Computer Fundamentals

Toggle sidebar
bg1
AD-CS / BS-CS / BS-SE Program CS-133 GIFT University Gujranwala
Course: Programming Fundamentals
Resource Person: Hira Haleem
4-Jan-2023
Fall 2022
PostLabTask-
01
Total points: 15
Submission Date: 9-Jan-2023 11:59 AM
Section: I
Instructions: Please Read Carefully!
•This is an individual Class Participation. Everyone is expected to complete the given
task on their own, without seeking any help from any website or any other individual.
There will be strict penalties for any work found copied from any source and the university
policy on plagiarism will be strictly enforced.
•You are expected to submit this cp as:
a. Create a single .java file solution of each cp question. The names of the .java files
should be as mentioned in the question.
b. Then, create a single .zip file containing the complete solution (.java and .jpg files
only) of your implementation. This zip file must be named as “YourName-Your ID-
SectionName.zip”, for example, “Ayesha-21223456-Section-I.zip”, and nothing
else!
c. The zip file must not contain any other files except the .java files and cmd output
screenshots.
•Class Participation is to be submitted via Google classroom within the stated deadline above.
a) Submit the zip file.
b) Make sure that your file is turned in. File that’s not turned in will be considered not
submitted and therefore the student will be awarded with zero marks.
•Any cp submission not following the above directions will not be accepted!
•No Late submissions will be accepted.
pf2

Partial preview of the text

Download Programming Fundamentals Class Participation and more Assignments Computer Fundamentals in PDF only on Docsity!

AD-CS / BS-CS / BS-SE Program CS-133 GIFT University Gujranwala

Course: Programming Fundamentals

Resource Person: Hira Haleem 4-Jan-

Fall 2022

PostLabTask-

Total points: 15 Submission Date: 9-Jan-2023 11:59 AM Section: I

Instructions: Please Read Carefully!

  • This is an individual Class Participation. Everyone is expected to complete the given task on their own, without seeking any help from any website or any other individual. There will be strict penalties for any work found copied from any source and the university policy on plagiarism will be strictly enforced.
  • You are expected to submit this cp as: a. Create a single .java file solution of each cp question. The names of the .java files should be as mentioned in the question. b. Then, create a single .zip file containing the complete solution (.java and .jpg files only) of your implementation. This zip file must be named as “YourName-Your ID- SectionName.zip” , for example, “Ayesha-21223456-Section-I.zip”, and nothing else! c. The zip file must not contain any other files except the. java files and cmd output screenshots.
  • Class Participation is to be submitted via Google classroom within the stated deadline above. a) Submit the zip file. b) Make sure that your file is turned in. File that’s not turned in will be considered not submitted and therefore the student will be awarded with zero marks.
  • Any cp submission not following the above directions will not be accepted!
  • No Late submissions will be accepted.

AD-CS / BS-CS / BS-SE Program CS-133 GIFT University Gujranwala

1. Task #1: Percentage of a number [7.5]

In this task, you are being asked to write a program which will output the percentage of a number. Write a program which stores a number in an appropriate variable and outputs 35% of that number on console.

Instructions:

1. Create a program Lab3Task1.java 2. Use appropriate variables to store data. 3. Print the output with an appropriate message.

2. Task #2 Converting word problems into programs [7.5]

In this task, you are being asked to write a given word problem as a program. Create a variable to store the amount of a purchase as a real value. The program should then compute the state and county sales tax.

  1. Assume the state sales tax is 4 percent and the county sales tax is 2 percent.
  2. Hint: (Purchase Amount is 1200).
  3. Calculate the AnualState sales tax (purchase amount * statesaletax /100)
  4. Calculate AnualCountry sales tax
  5. Calculate Total sales tax (sum of AnnualCountry and AnnualState sale tax)
  6. Calculate Total sales (sum of amount of purchase and total sales tax) The program should display the purchase amount, the state sales tax, the county sales tax, the total sales tax, and the total sale. Create a program called SalesTax.java. 1. Create appropriate variables with values as given in the statement above. 2. Run and print the required values.