Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider that a system has two entities, Students, Instructors and Course. The Student has the following properties: student name, ID, and GPA.The instructor has the
Consider that a system has two entities, Students, Instructors and Course. The Student has the following properties: student name, ID, and GPA.The instructor has the following properties: name, ID, Salary and department name. Finally the Course has Name, ID , Instructor and array of 3 students.
Implement the above system taking into account the following requirements:
- Define array of 4 Courses with instantiating all its properties.
- Assume that instructor1 and instructor2 are two objects of type Instructor, write a code that enables you to write: if (instructor1.isequal (instructor2)). The statement is true if the two objects have the same name and ID.
- Define a function with the following signature void PrintCSalary(Course [ ]), The function prints the index and the name of the course that has Instructor with Max Salary.
- Define a function with the following signature void PrintMaxGPA(Course [ ]), The function prints the index and the name of the course that has Max average of its Students GPA.
- Define a function that has the following signature Instructor * getInstByID(Course [ ], int id). The function returns a pointer to one of the instructors in the array of courses, who has the same id (sent to the function).
- Write a getCourseList(int ID) function that returns a list of courses that the student registered in.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started