Create the project named SP2020LAB6PART2_yourLastName then provide an application named IceCreamStore_yourLastName for a store that sales ice cream in 3 sizes of cups, small, medium and large.

Cup Size Unit Price
Small cup $3.79
Medium $4.99
Large $5.99

First, display a menu to allow the users to select the following tasks:

ICE CREAM STORE
1. Sale Ice Cream
2. Total sale Ice cream today
3. Total sale ice cream in the month
0. EXIT

TASK1: SALE ICE CREAM

For each time sale Ice Cream, the application do the following:

  • Display the menu to allow users select the size of cup, then enter the number of cups to sale.
  • Users can continue select other size of cups until users select DONE
SALE ICE CREAM
1. Small cup
2. Medium cup
3. Large cup
0. DONE
  • Print out the receipt in the following format:
ICE CREAM STORE
RECEIPT Today: 02/24/20
------------------------------------------------------
Small: 3.79 2 7.58
Medium: 4.99 2 9.98
Large: 5.99 1 5.99
------------------------------------------------------
Subtotal: 23.86
Tax (8.25%): 1.97
Total: 25.83
  • The total number of small cups, the total number of medium cups and the total number of large cups will be maintained for all sale transactions during the day

TASK2: TOTAL SALE ICE CREAM TODAY

  • Any time users select this task, print out the DAY report on the screen in the following format
ICE CREAM STORE
DAY REPORT Today: 02/24/20
------------------------------------------------------
Small: 3.79 101 382.79
Medium: 4.99 115 573.85
Large: 5.99 112 670.88
------------------------------------------------------
Subtotal 1627.52
Tax (8.25%); 134.27
Total: 1761.79
  • Display message and read the answer of the question: "Is this the sale at the end of today? Do you want to save this information to file? (Y/N)"
  • If the answer is Y or y, open file "MonthSale_0220.txt" to write in the following format for one day 02/24/20
02/24/20 101 115 112

TASK3: TOTAL SALE ICE CREAM IN MONTH

  • Display message and read the answer for the month and the year that you want to print out the report in the format MMyy. For example, 0220 for February 2020
  • create the file name MonthSale_0220.txt then open file to read
  • read line by line to add up all number of small cups, number of medium cups and number of large cups were sold in month, each line is for one day that we saved in the task 2
  • print the MONTH report in the following format:
ICE CREAM STORE
MONTH REPORT - MonthSale_0220.txt
-------------------------------------------------------------
Small: 3.79 4713 17862.27
Medium: 4.99 4402 21965.98
Large: 5.99 6711 40198.89
------------------------------------------------------
Subtotal: 80027.14
Tax (8.25%); 6602.24
Total: 86629.38
  • Display message and read the answer of the question: "Is this the sale at the end of month? Do you want to save this information to file? (Y/N)"
  • If the answer is Y or y, open file "YearSale_2020.txt" to write in the following format for a month
0220 4713 4402 6711
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.