We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
GIFT UNIVERSITY
G U J R A N W A L A (Chartered by the Govt. of the Punjab, Recognized by HEC)
Programming Fundamentals-LAB (CS-133)
Section: G Marks: ASSIGNMENT - 03 10 Instructor: Fall-2023 Deadline: 13th Feb 2024 Syed Task: Dilawar Abbas Implement a java program for a grocery store that calculates the total cost of items in a shopping cart. Additionally, a discount should be applied if the total quantity of items purchased exceeds 5. Your program should use a for loop to iterate through each item, take input for the item price and quantity, and then calculate the total cost. If the total quantity of items is greater than 5, apply a 10% discount on the total cost. Sample Output:
1. Create a program YourName_YourRollNumber.java
2. Create appropriate variables and assign values using a Scanner
object. 3. Correctly display appropriate messages. 4. Run and print the required values.
Comment Your Name and Your Roll Number in the File.
Attach your screenshot of output in your created folder.