Lab Assessment
Lab Assessment
Question Q1 Q2 Q3 Q4 Total
Grade
Out of 2 2 2 2 8
Q1) [2 Marks]
Prompt the customer to start shopping or to exit from the program.
If the customer chooses to start shopping, a list of grocery items should
be displayed to choose from. Each item should have a different price,
for example:
1- Milk (6 AED)
2- Fruit (14 AED)
3- Bread (25 AED)
Q2) [2 Marks]
After choosing an item, the customer should be asked to confirm whether he
wishes to add it to his cart or not. If he adds it to the cart, the total sum
should be updated.
Q3) [2 Marks]
After the customer has chosen to add the item to the cart or otherwise, he
should be prompted as to whether he wishes to continue shopping or to
proceed to checkout.
Q4) [2 Marks]
If the customer wants to checkout, ask if he wishes to donate to charity, the
donation amount (5 AED) should be added to the final bill.
The final bill should include a tax amount (10% of the total) and the amount
of charity donated, if any. Make sure to display the final bill amount.
Program
Output