DESIGN OF CLASS HIERARCHIES MCQs
We are passing the objects and executing them in a certain order and we are printing the program flow.
$ g++ des3.cpp
In this program, We are passing the values from the main class and printing it on the inherited classes.
$ g++ des2.cpp
In multiple inheritance, We are able to derive a class from more than one base class.
In this program, We are multiplying the value 10 and 4 by using inheritance.
$ g++ des.cpp
There are three types of classes. They are abstract base classes, concrete derived classes,
Class hierarchies promote reuse in two ways. They are code sharing and interface sharing.
If we invoked the interface as public means, We can access the program from other programs also.