Question
Can someone help me out with this C++ assignments...thank in advance! Note: This program has to be written in C++. A. OBJECTIVES -Review the do..while
Can someone help me out with this C++ assignments...thank in advance!
Note: This program has to be written in C++.
A. OBJECTIVES
-Review the do..while loop
-Review the switch statement
-Review how to format the output in columns
-How to create and call the user-defined functions
-Apply reference paramenter to user-defined function
-How to access the default parameters
-How to get the current date in format MM/DD/YYYY
-How to split a string into substring with delimeter
B. REQUIREMENT STATEMENT
A Ice cream store sales ice cream in 3 sizes of cups, small, medium and large.
Cup Size UNIT PRICE
Small cup $4.29
Medium $5.89
Large $6.49
// Write an application for an Ice Cream shop that allow users to do the following tasks. After finishing a task, display the menu again to allow users to continue to select other task until they select exit:
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:
RECEIPT SALE ICE CREAM Date: 03/18/18 Small 2 8.6 Medium: 2 11.8 Large: 1 6.5 ======================================================================================== Subtotal: 26.9 Tax (8.25%): 2.2 Total: 29.1
Task2: Total Sale Ice Cream Today
-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
-Print out the DAY report in the following format:
TOTAL SALE ICE CREAM DAY REPORT:
Date: 03/18/18
Small: 27 115.8
Medium: 38 223.8
Large: 28 181.7 =======================================================================================Subtotal: 521.4
Tax (8.25%): 43.0
Total: 564.4
-Display message and read the answer of the question: Do you want to save the sale today to file? (Y/N)
-If the answer is Y or y, open file sale_0318.txt to write in the following format
03/18/18 27 38 28
TASK3: TOTAL SALE ICE CREAM IN MONTH
-Display message and read the answer for the month of the year that you want to print out the report in the format MMYY. For example 0318 for March 2018.
-create the file name sale_0318.txt open 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:
TOTAL SALE ICE CREAM MOT REPORT: Date: 03/18/18 Smal: 101 433.3
Medium: 115 677.3
Large: 115 720.4 ======================================================================================= Subtotal: 1831.0 Tax (8.25 %): 151.1 Total : 1982.1
HOW TO DO THE LAB
To do the lab you should follow the following steps:
ANALYZE: -You should read the requirement again to see what the requirement gives you and what it asks you to do then write them on the paper.
-Think about what C++ statements you already know and what new statements you need to learn to do this lab.
PSEUDO-CODE
Pseudo-code is written in English that lists what you have to do step by step in the main such that your program is qualified to the requirement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started