Question: 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:

  1. Define array of 4 Courses with instantiating all its properties.
  2. 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.
  3. 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.
  4. 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.
  5. 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).
  6. 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

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!