Answered step by step
Verified Expert Solution
Link Copied!

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:

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago