Write a menu based program to create a list of record using stack and queue concept. In your program, you must give an option to the user either to create a list of record using stack concept or queue...


Write a menu based program to create a list of record using stack and queue concept. In your program, you must give an option to the user either to create a list of record using stack concept or queue concept. The object needed to impement in the code are

shoes
.


program:


int main ()
{
char selection;
int option;


do
{
cout < "\n="" main="">
cout < "\n="">
cout < "\n="" q="" -="">
cout < "\n="" s="" -="">
cout < "\n="" x="" -="" exit="">
cout < "\n="" enter="" selection:="">


// read the input
cin >> selection;


switch (toupper(selection))
{
case 'Q': do{
cout < "\n="" queue="" list="">
cout < "\n="">
cout < "\n="" 1="" -="">
cout < "\n="" 2="" -="">
cout < "\n="" 3="" -="" queue="">
cout < "\n="" 4="" -="" queue="">
cout < "\n="" 5="" -="" view="">
cout < "\n="" 6="" -="" back="" to="" main="" menu="">
cout < "\n\n="" enter="" selection:="">
cin>>option;


switch(option)
{
case 6: cout<"\nback to="" main="">
break;


default: cout < "\n="" invalid="">
}
}while (option != 6);


break;


case 'S': cout < "\n="">
break;


case 'X': cout < "\n="" to="" exit="" the="">
break;


// other than A, M, D and X...
default: cout < "\n="" invalid="">


}
}while(toupper(selection) != 'X');


return 0;
}



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here