Question: Answer in C++ [12 pts] Define the class Student. The Student class has a name(string), totalCreditslint) and pricePerCreditidouble) as private data members. Include default constructor,

Answer in C++

Answer in C++ [12 pts] Define the class Student. The Student class

[12 pts] Define the class Student. The Student class has a name(string), totalCreditslint) and pricePerCreditidouble) as private data members. Include default constructor, which is blank and a constructor with parameter to initialize the all private data members. The Student class must include the method compute Tution() that evaluate the tuition due (credits $ per credit) returns a double a. [6 pts] Derive the Class MasterStudent from the Student, the MasterStudent class has one additional private data member called graduateFee(double). Supply constructors and override the method computeTuition). The MaterStudent tuition is computed the same as the regular Student except that the graduatefee is added. b. [6 pts] Derive the class PhdStudent from the MasterStudent, The PhdStudent has one additional private data member called researchFee (double). Supply constructors and override the method computeTuition). The PhdStudent tuition is computed the same as the MasterStudent except that the researchFee is added. [6 pts] Show the sample tuns of the program by displaying the result for the objects of different classes (Student, MasterStudent, PhdStudent). In one example demonstrate polymorphism. c

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!