What is multiple inheritance?

Answer Posted / guest

You can derive a class from any number of base
classes. Deriving a class from more than one direct base
class is called multiple inheritance.

In the following example, classes A, B, and C are
direct base classes for the derived class X:

class A { /* ... */ };
class B { /* ... */ };
class C { /* ... */ };
class X : public A, private B,
public C { /* ... */ };
The following inheritance graph describes the
inheritance relationships of the above example. An arrow
points to the direct base class of the class at the tail of
the arrow:



The order of derivation is relevant only to determine the
order of default initialization by constructors and cleanup
by destructors.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance write a program to show use of inheritance?

613


What is object and class in oops?

588


• What are the desirable attributes for memory managment?

1728


What does and I oop mean?

615


What is the significance of classes in oop?

590






Why is destructor used?

585


When not to use object oriented programming?

572


What is encapsulation process?

582


what type of questions

1697


officer say me - i am offered to a smoking , then what can you say

1582


What is the importance of oop?

611


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

699


What is overloading in oop?

577


What is interface in oop?

664


Why do we need polymorphism in c#?

687