Question: Design a struct personal Info with components id, and name of type string. Design a class student with private data member's person (struct variable of

 Design a struct personal Info with components id, and name of

Design a struct personal Info with components id, and name of type string. Design a class student with private data member's person (struct variable of type personalinfo), numberOfCourses (of type integer), average (of type float), and marks[] an array of student's marks of type integer. The class also has the member functions ser( ), getPerson(), print(), findAverage(), getAverage(), and a parameterized constructor with default value 1 for the number of courses. Implement the member functions of the class student The member function findAverage() is used to calculate the average mark for each student. Write a driver that does the following: 1 Declares the array section[ ] of objects of student type. Reads the number of students. Reads information for each student from the file student. ext. Calls the user-defined function int maxAverageIndex(int, student Prints the id and name of the student with the maximum average. Student.txt: 1463491 Ali 1370005 Yousef 5437330 Amna 2600004 Abrar 1300002 Sadig 4 72 65 81 85 5 91 82 94 75 87 3 68 72 63 4 52 83 74 66 2 72 61 Sample input/output: 5 Student Ali with id 1463491 has average 75.75 of 4 courses. Student Yousef with id 1370005 has average 85.8 of 5 courses. Student Amna with id 5437330 has average 67.6667 of 3 courses. Student Abrar with id 2600084 has average 68.75 of 4 courses. Student Sadiq with id 1300002 has average 66.5 of 2 courses. Student 1370005 Yousef has the maximum average

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!