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 illustrate union declaration? A C program encloses the following union declaration: union id { char color[12]; int size; } shirt, blouse; At this

Rules for overloading an operator This summarizes the most significant points you need to know in order to do operator function overloading. The only operators you may o

a program code for superposition of sine waves


Armed with your function from above, we can do some interesting things. For instance, any pixel where the offsets are both zero is a pit (lower than all surrounding points) .

The new and delete operators The C language has explained library functions- malloc() and free() for dynamic allocation and de-allocation of memory. C++ gives yet another appro


You are working for a computer gaming company and have been asked to look at a survival game.  You will be simulating a rabbit stranded on an island, collecting a large number of s

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Explain Rules for constructing variable names? The Rules for constructing variable names : a) A variable name is any combination of alphabets, 0 to 9 digits and undersc