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 areshoes.
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 inputcin >> 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="">"\nback>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;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here