Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Parallel Array Menu Program Using Microsoft Visual Studio C++Programming, develo

ID: 3870830 • Letter: P

Question

Parallel Array Menu Program Using Microsoft Visual Studio C++Programming, develop a menu program of your choosing which reads in data ram 4 input files: drinks, appetizers, main courses, and desserts. The program must use the fallowing: parallel arrays, input files, laops, and counters far each of the faur types. You get to make up the items on the menu as well as their prices and store them in input files. Then, record the item infarmation ordered by the customer for each item selected, when finished, display all items to the screen with the subtotal, tax(10% for easy math), and the total. Be sure to get tip as well. Yaur pragram must not have redundant cade! Use functions where possible to remove all redundant cade. The cade bekow is my start to the pragram. The functions are nat campletely correct et. They were in the pracess af being changed fram a program we did in class. I need help to finish my program. nt upprtice Counter int des ertCountar out Me ystee FlLe not found" endl rink.cpen drint.tet' appetier..opetapetitor.trt.); tancur.cpen("naicanm.trt.); rts.cpem/ diert.at" cherk drinks,Trinks" nt getstuft(Ciot counter, strlog rom, Ifstrem81Fe (1FLe.et getline(LFLie, cartel); return counter prr, drink, rinka: vold atgvt(1nt carte, str1], strSig text)( rinka.clow Courm.clena): rt.clow eturn const Int x-

Explanation / Answer

#incude<iostream.h>

#include<conio.h>

#include<iomanip.h>

using namespace std;

void filecheck(ifstream &ifile,string name)

{

if(F1file.is_open())

{ cout<< name <<"file not found"<< endl;

system("pause");

exit(1);

}

}

intgetstuff(int counter,string name[],ifstream &ifile)

{

while(f1file.eof())

{

getline(f1file,name[counter]);

1file.ignore();

counter++;

}

return counter;

}

void output(int counter, string name[], string text)

{

for(int i=0;ii<counter,i++)

{

cout<<text<<name[i]<<endl;

}

]

int main()

{

int i,itemnumber=0;

char name[5][25]; // an aray of 5 names

int quantity[5];

strcpy(name[0],"Drink");

strcpy(name[1],"Appetizer");

strcpy(name[2],"Main course");

strcpy(name[3],"Dessert");

for(int i=0;i25;i++)

{

int itemNumber=0;

cout<< what do you want to order";

cin>>names [itemNumber];

cout<<" How many?";

cin>> quantity [itemNumber];

}

return 0;

}