3.A program to get the information of a derived class data members via name, roll number, sex, height and weight from the keyboard; again to read data for another derived class such as name, roll...







3.A program to get the information of a derived class data members via name, roll number, sex, height and weight from the keyboard; again to read data for another derived class such as name, roll number, sex, course, semester and rank and display the contents of the newly created class on the screen.


This program demonstrates a single inheritance concept which consists of a single base class and two derived classes. The data members and member functions of the base class are independently accessed by these two derived classes. The OMT of a class notation for single inheritance is given in Fig. 12.5.


















Fig. 12.5 OMT of a Class Notation for Single Inheritance












May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here