Write a program that implements the concept of inheritance. For example: in the
ID: 3938652 • Letter: W
Question
Write a program that implements the concept of inheritance. For example: in the following scenario. Air university is inherited by both student and instructor class. In main () you will enter the information from each person who want to get admission/join Air University. If he is a student then will save all his information (e.g. gpa, enroll course, any paid fees) and so for instructor. Second step is to display all the information accordingly if user chooses a choice to show all students/teacher information.Explanation / Answer
In the below code the concept of inheritance is implemented just write a main class as you desired.
class AirUniversity
{
public:
int id();
};
class Student : public AirUniversity
{
public:
double gpa();
bool enroll(Course&);
bool pay(double dollars);
};
class Instructor : public AirUniversity
{
public: double grade(Artifact&);
bool teach(Course&);
bool getPaid(double dollars);
};
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.