When should you employ multiple inheritance?, C/C++ Programming

Q: When should you employ multiple inheritance?

A:There  are  three  acceptable  answers:-  "Rarely," "Never," and  "while  the  problem  domain cannot be modeled accurately any other way." Presume an Asset class, developing class, Vehicle class, and CompanyCar class. All of the company cars are vehicles. Some of the company cars are assets since the organizations own them. Others may be leased. Not all of the assets are vehicles. Money accounts are assets. Real estate storing are assets. Some of the real estate holdings are buildings. Not every building is assets.  Ad infinitum.  While you diagram these relationships, it becomes clear that multiple inheritances are a probable and intuitive way to model this common problem domain. The applicant must understand, though, that multiple inheritance, such as a chainsaw, is a useful tool which has its perils, needs respect, and is best ignored except while nothing else will do.

 

Posted Date: 3/16/2013 2:51:54 AM | Location : United States







Related Discussions:- When should you employ multiple inheritance?, Assignment Help, Ask Question on When should you employ multiple inheritance?, Get Answer, Expert's Help, When should you employ multiple inheritance? Discussions

Write discussion on When should you employ multiple inheritance?
Your posts are moderated
Related Questions
Write a program that predicts users’ age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial gues


A: Use a member while you can and a friend when you need to. Sometimes friends are better syntactically (e.g., in class Fred, friend functions let the Fred parameter to be secon


What is the difference among const char *myPointer and char *const myPointer?  A: Const char *myPointer is a non constant pointer to constant data; whereas char *const myPointer

In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with page

write a program that declares and initializes 2 integer variable a and b with the value 35 and 14, and displays and calculates their sum,product,quotient and real division result.t

how to write a c program for stone game

Object Conversions Just like initialization, conversions are also done automatically when an object of a derived class is assigned to an object of the base class. Though, the c

Bitwise Operations 1. Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For ex