Question: Design a base class called Student with the foll. 2 fields:- (i) Name (ii) Id. Derive 2 classes called Sports and Exem from the Student

Design a base class called Student with the foll. 2 fields:- (i) Name (ii) Id. Derive 2 classes called Sports and Exem from the Student base class. Class Sports has a field called s_grade and class Exem has a field called e_grade which are integer fields. Derive a class called Results which inherit from Sports and Exem. This class has a character array or string field to represent the final result. Also it has a member function called display which can be used to display the final result. Illustrate the usage of these classes in main.

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To design and implement the inheritance relationship among these classes lets break down the requirements and steps systematically Step 1 Define the B... View full answer

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 Programming Questions!