Code the hierarchy shown above adding appropriate attributes/member functions/member variables and extent the hierarchy from the Student class. Use Student as the base class of the hierarchy, then include classes UndergraduateStudent and GraduateStudent that derive from Student. Continue to extend the hierarchy as deep (i.e., as many levels) as possible. For example, Freshman, Sophomore, Junior and Senior might derive from UndergraduateStudent, and DoctoralStudent and MastersStudent might derive from GraduateStudent. After drawing the hierarchy,
Code the hierarchy shown above adding appropriate attributes/member functions/member variables and extent the hierarchy from the Student class. Use Student as the base class of the hierarchy, then include classes UndergraduateStudent and GraduateStudent that derive from Student. Continue to extend the hierarchy as deep (i.e., as many levels) as possible. For example, Freshman, Sophomore, Junior and Senior might derive from UndergraduateStudent, and DoctoralStudent and MastersStudent might derive from GraduateStudent. After drawing the hierarchy, create an object of each class in the main function and call at least one function inherited in it. Do not use strings. User char pointers instead. Provide all type of constructors (including copy constructors), destructor, display() and setter/getter for each class, whether it is mentioned or not. Make a menu driven code.
Step by step
Solved in 2 steps with 1 images