Question: lare an array of the structure shown below the maximum sise of the array is linited to 100 struct student ( string name, int no


lare an array of the structure shown below the maximum sise of the array is linited to 100 struct student ( string name, int no of unitsj int mark[ 1 Step 2: Create amenu driven Ctt.p Open the text file and read the contents into the array of the student structure, use the reodfile function name: stores the name of the student. no_of units: stores the number of units (hint: it will act as the size of the mark array). mark[5]: stores marks of the different units. Display the menu for the user using the menu function. The contents of the menu function should be: Enter 1 to display the grade details Enter 2 to find the average mark of a student Enter 1 to exit the program Option 1: displays all the contents of the array of the student structure on a terminal as shown on the screen shot below. Use display function for this option. This display function must use the array of the structure to display the grade details Option 2: ask the user to enter the name of a student and then calculate and display the average marks (precision-two decimal places) of that student, if there is no such student the program should report it back to the user. Use the find_overage function for this option. This find average function must use the array of the structure to calculate the average. int readl iXo(fstream student |]) id aisplay(student [1, ) rage(student (,t, The program should exit only when the user inputs 1. Your program must have: 1. A readFile function 2. A menu function 3. A display function 4. A findAverage function dent struct You are allowed to use your own version of function prototypes, but you must use the stu given in the problem and must use the array of the student structure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
