Question: C++ I need all steps please. Define the class Student . The Student class has a name (string), totalCredits (int) and pricePerCredit (double) as private
C++ I need all steps please.
Define the class Student. The Student class has a name(string), totalCredits(int) and pricePerCredit(double) 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 computeTuition() that evaluate the tuition due (credits * $ per credit) returns a double
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.
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.
Demonstrate polymorphism using these classes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
