Question
please post final code LAB 3.5 Complete Program Step 1: Remove table.cpp from the project and add the icecream.cpp program in your Lab3 folder to
please post final code
LAB 3.5 Complete Program
Step 1: Remove table.cpp from the project and add the icecream.cpp program in your Lab3 folder to the project. This file contains just a program shell in which you will write all the programming statements needed to complete the program. Here is a copy of the current contents of icecream.cpp.
1 // Lab 3 icecream.cpp 2 // WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM. 3 // PUT YOUR NAME HERE. 4 // INCLUDE ANY NEEDED FILES HERE.
5 using namespace std; 6 7 int main() 8 { 9 // DEFINE NAMED CONSTANTS HERE TO HOLD THE PRICES OF THE 3 10 // SIZES OF ICE CREAM CONES. GIVE EACH ONE A DESCRIPTIVE 11 // NAME AND AN APPROPRIATE DATA TYPE. 12 13 // DECLARE ALL NEEDED VARIABLES HERE. GIVE EACH ONE A DESCRIPTIVE 14 // NAME AND AN APPROPRIATE DATA TYPE. 15 16 // WRITE STATEMENTS HERE TO PROMPT FOR AND INPUT THE INFORMATION 17 // THE PROGRAM NEEDS TO GET FROM THE USER. 18 19 // WRITE STATEMENTS HERE TO PERFORM ALL NEEDED COMPUTATIONS 20 // AND ASSIGN THE RESULTS TO VARIABLES. 21 22 // WRITE STATEMENTS HERE TO DISPLAY THE REQUESTED INFORMATION. 23 24 return 0;
25 }
Step 2: Design and implement the icecream.cpp program so that it correctly meets the program specifications given below. You may find it helpful to use pseudocode to work out the program logic before you begin coding the program in C++.
Specifications: The DeLIGHTful Ices Company sells delicious but low-cal light ice cream cones in 3 sizes and prices: DeLIGHTful (1 scoop) 1.49 Double DeLIGHT (2 scoops) 2.49 Triple DeLIGHT (3 scoops) 3.49 Write a program that prompts the user to enter the number of each cone type sold that day, and then computes and displays a daily sales report that includes the following nicely formatted and labeled information. Number of cones sold of each type Total sales $ of each type Total number of cones sold Total sales $ of all cones sold | Sample Run Number of single scoop cones sold: 220 Number of double scoop cones sold: 414 Number of triple scoop cones sold: 66
DeLIGHTful cones 220 $ 327.80 Double DeLIGHT cones 414 $1030.86 Triple DeLIGHT cones 66 $ 230.34 Total 700 $1589.00
|
Step 3: Once you have your program working, test it with the data given in the sample run above and with one other good test case of your own.
Step 4: Print a copy of the source code and the output of both runs to hand in to your professor.
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