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
Problem : Luminous Jewels - Polishing Necklace Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of v

Program which can check the given string is super ascii or not


Write a C++ program doing the following: The program reads from the keyboard the numbers of rows and columns of a 2-D array of integers. Then, it allocates this array (let’s name i

A more advanced data type is the structure; here we can define a template as a collection of different variables e.g.     struct birthdate   {     int month;     int day;

(a) Write a Scheme procedure to evaluate the expression: 7/6+2*5+(3*2+6*7)*4. (b) Write a Scheme procedure to evaluate the expression: 2*(-1+(-3+4*2-7)*3/(3*2)).

define a class for student


color representation 0,1,2,3,4,5,6,7...

write a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits a and b