Answered step by step
Verified Expert Solution
Link Copied!

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++

image text in transcribed

[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

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

More Books

Students also viewed these Databases questions

Question

What would you do to help someone engage in reflection?

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

Does it use a maximum of two typefaces or fonts?

Answered: 1 week ago