I need to create a menu driven program that will display the following: MAIN MEN
ID: 3629194 • Letter: I
Question
I need to create a menu driven program that will display the following:MAIN MENU
0. Exit
1. Search for a student
2. List students enrolled in a course
3. List students eligible to graduate
4. List all students
5. Update a student record
6. Add a student record
7. Delete a student record
Your choice ->
Please help.
Explanation / Answer
one way to do the menu is to use a while loop and switch. it will look like this. you have to define an int choose which will take the user input.in each case you can put the function call or just the code. while(1) // infinite loop { // print the menu or call the menu function cin>> choose switch(choose) case 0: exit(1) \ to preform exit case 1: ........ } a good way to do the menu is to create a function that just print the menu which will make the main easier to read. void print menu() { //add the options as a cout }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.