Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer in C++ [12 pts] Define the class Student. The Student class has a name(string), totalCreditslint) and pricePerCredit(double) as private data members. Include default constructor,
Answer in C++
[12 pts] Define the class Student. The Student class has a name(string), totalCreditslint) 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 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. [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 runs of the program by displaying the result for the objects of different classes (Student, MasterStudent, PhdStudent). In one example demonstrate polymorphism. b. c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started