Question: This needs to be in C++ Heres what was given /* FILL THIS IN */ #include #include using namespace std; int main() { //variable declarations
This needs to be in C++



Heres what was given
/*
FILL THIS IN
*/
#include
#include
using namespace std;
int main()
{
//variable declarations
string lineOfStars(60, '*');
int numA1=0, numA2=0, numA3=0;
int numD1=0, numD2=0, numD3=0;
int numM1=0, numM2=0, numM3=0, numM4=0;
int numPeople;
int mainChoice;
int subChoice;
double total=0;
string name;
//print header
cout
cout
cout
//start user input
cout
cin >> numPeople;
//validate input
/* CODE FOR MAIN MENU
cout
cout
cout
cout
cout
cout
cin >> mainChoice;
*/
/* CODE FOR APPETIZER SUB MENU
cout
cout
cout
cout
cout
cout
cin >> subChoice;
*/
/* EXAMPLE OF HOW YOU WILL READ IN NUMBER OF ITEM & ACCUMULATE THE TOTAL
cout
cin >> numA1;
total += (numA1*2.99);
*/
/* CODE FOR DRINK SUB MENU
cout
cout
cout
cout
cout
cout
*/
/* CODE FOR MEAL SUB MENU
cout
cout
cout
cout
cout
cout
cout
*/
//print results (receipt)
cout
cout
cout
cout
cout
cout
if(numA1 != 0)
cout
if(numA2 != 0)
cout
if(numA3 != 0)
cout
cout
if(numD1 != 0)
cout
if(numD2 != 0)
cout
if(numD3 != 0)
cout
cout
if(numM1 != 0)
cout
if(numM2 != 0)
cout
if(numM3 != 0)
cout
if(numM4 != 0)
cout
cout
return 0;
}
- Downluad lab5given.cpp. - In your cscisooLAB folder, create a Lab5purple_yourTTUusemame folder. - Download from the LAB S assignment and place inside the folder you just created. - Rename the source file to - In the given source file, the text for the menus are given to you as well as the headeriwelcome information and the printed results. - Then, ask the user for the number of people are included in their order. Input validationt the user's input should be 1,2 , or 3 . Do not allow more than 3 people or a negative value. (use while loop) - For each person (use for loop to control this), you should ask the person's name. Then, display the main menu of choices between appetizer, drinks, meal, ar quit. Input validation: use a while loop to validate the user entered a valid choice. - The user shnuld be able to srler. from this menu as many times ass they wish until thry select 4 , to quit. llse a do-while loop to execute this logic. the main menu (appetizer), then they should be able to select from three different appetizers in the sub-menu [dumbledonuts, potterfries, and griffintoes) along with their prices. Refer to sample output, Input validation: use a while loop to validate the user entered a valid choice. - Ihen, ask the user how many of the chosen appetizer they want. - Throughout the program, you will keep a running total of how many of each menu item the user wants and then you will calculate their total hill. - Once the user decides to quit ordering [choice 4 in main menu], then you should print out their "receipt". This part is given to you. - Make sure your output is easy to read like the sample output. - Make sure to put a comment block at the top of your code with the filename, author (you), date, and purpose of the program. Alsa make sure ta put in comments to identity major sectians of yaur code. - You MAY NOT use functions other than the main function, arrays, pointers, structures, or classes. You MAY NOT use C++ libraries not covered in class. SAMPLE OUTPUT User input is highlighted in yellow. How mang people are inoluded in your order? y Copst Please seleet 1,2 , or 3 . Hoor many people ato tnaluded in your order? 2 Derrobn 1, what. is your nammo HUGINAIS HXSIALHANI How many poeple are inaluded in youx ondere 9 Hoe many people are 1 noluded 1n gour order? 2 Faxeon 1, what 1 s pout nama? Mi, Trindmlweld. Mhat vrsld yon likm to crinr? 1. Mryati rer 2. Drinker 3. Meal 4. I'in lusas I Enter 1-4 -4 Goper That iab't i. Yaldid choloe. Entar 14=2 Thonos from the foll wortmg drtnks = 1. Julyjuits jutian 55.99 2. Dunth Ratnr Neugrini 56.99 3. Butter Eecr \&4.99 ctuuuse 1-3: 2 Herer many Tunath Vatio Nagrent 6 des ymu want.o 9 Hi. ixizduelwald. Mhat vould you likes to curtus? 1. Nrgenti mnr 2. Dxinker 3. Masl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
