Write a c++ program to read save sort search and display


Write a C++ program to read, save, sort, search and display the students' ids, student names and marks of N students.
N=7 should be declared as a constant in your program. You must use structures, arrays and functions to store the students' IDs, names and marks.
Your program should display and execute a menu with the following options.
A switch statement must be used to execute the following menu options.
Menu
---------
1. Clear
2. Register a Student (Id, Name, Mark)
3. Display the student with a highest mark
4. Display the marks of all students
5. Display the percentage of the total mark received by each student
6. Sort all marks in ascending order
7. Sort all marks in descending order
8. Search for a student with a given id
9. Search for a student with a given name
10. Search for a student with a given mark
11. Exit
Explanation
1. Clear
This option initializes all the elements of the arrays to -1 to indicate that array is empty and names to null.
2. Register a Student (Id, Name, Mark)
This option reads and stores the student's id, student's name and student's marks. The marks (float numbers) are entered from the keyboard.
3. Display the student with a highest mark
This option displays the student id, name and mark for a student with a highest mark.
4. Display the marks of all students
This option displays the students' IDs, names, marks of all students.
5. Display the percentage of the total mark received by each student
This option displays the percentage of the total mark for all students.
6. Sort all marks in ascending order
This option sorts all marks in ascending order. You can use any sorting algorithm which uses at least two while loops and one if statement.
7. Sort all marks in descending order
This option sorts all marks in descending order. You can use any sorting algorithm which uses at least two while loops and one if statement.
8. Search for a student with a given id
This option searches for a student with a given id. The program asks the user to enter the id using the keyboard and searches for it. If an appropriate student is found, the program displays the message "student found" and displays the id, name and the mark otherwise it displays a message "no student found".
9. Search for a student with a given name
This option searches for a student with a given name. The program asks the user to enter the name using the keyboard and searches for it. If an appropriate student is found, the program displays the message "student found" and displays the id, name and mark otherwise it displays a message "no
student found".
10. Search for a student with a given mark
This option searches for a student with a given mark. The program asks the user to enter the mark using the keyboard and searches for it. If an appropriate student is found, the program displays the message "student found" and displays the id, name and mark otherwise it displays a message "no student found".
11. Exit
The program should display the message "Thanks for using this program", and exit.
The whole program should work in a loop to enable the user to select an item from menu until the user chooses to exit.
The program should contain main function and user defined functions. Arrays, functions, structs can be used in this program. You should not use things (eg classes, linked list, etc). 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a c++ program to read save sort search and display
Reference No:- TGS0128597

Expected delivery within 24 Hours