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
Should I call a destructor explicitly on a local variable?

Program to Open a file in C++: int main() {                  char ch;                  ifstream f1 ("OLDFILE.TXT");                  ofstream f2 ("NEWFILE.TXT");


1. Jewels can only be removed for polishing from either end of the necklace (i.e. head or tail) 2. Once a jewel type is removed from the necklace, all other instances of the same j

Define  C o ns t a n t a r g u me n t : T h e a r gu m e n t c a n b e a c on s t a n t a r gu m e n t .    T h e c o

Lennie McPherson, proprietor of Lennie''''s Bail Bonds, needs to calculate the amount due for setting the bail. Lennie requires something of value as collateral, and his fee is 10%

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

write a program that counts the number of occurrences of the string in the n-th Padovan string P(n)

need to create c++ classes to store all pascal types in compiler design.

#include #include #include using namespace std; #define MAX 5 #define INF (1 #define DEBUG if(0) #define pii pair #define pb(x) push_back(x) class