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
What is inheritance write a program to show use of inheritance?
What is object and class in oops?
• What are the desirable attributes for memory managment?
What does and I oop mean?
What is the significance of classes in oop?
Why is destructor used?
When not to use object oriented programming?
What is encapsulation process?
what type of questions
officer say me - i am offered to a smoking , then what can you say
What is the importance of oop?
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.
What is overloading in oop?
What is interface in oop?
Why do we need polymorphism in c#?