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
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
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
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.