
Multipath Inheritance 465
show() are functions of class game and reads and display data, respectively. In main(),
the object G of class game calls these functions one
by one to read and write the data. The output of the pro-
gram is shown at the end of the above program.
11.11 MULTIPATH INHERITANCE
When a class is derived from two or more classes, those
are derived from the same base class. Such a type of in-
heritance is known as multipath inheritance.
The multipath inheritance also consists of many types of
inheritance, such as multiple, multilevel, and hierarchi-
cal, as shown in Figure 11.11.
Consider the following example:
class A1 ...