How can we simulate the concept of multiple inheritance, C/C++ Programming

Problem:

(a) Using a class hierarchy of your own choosing, with at least TWO subclass levels, show

(i) the use of abstract and concrete forms of Java class and method in your hierarchy.

(ii) the role and purpose of constructors in each level of your hierarchy.

(iii) the meaning of 'polymorphism'.

In your answer, it should be clearly and fully explained how the proposed class structure is reflected in Java language and constructs.

(b) (i) Consider a class ‘Employee'. Given the knowledge we have of some of the different categories of employees like permanent salaried employees, commission employees, etc, write the sample code in Java to represent the class ‘Employee' such that it forms part of a hierarchy with subclasses.

Note: The class Employee should have different other classes inheriting from it at more than one level.

(ii) Use this same example to explain how we can simulate the concept of multiple inheritance in Java by using interfaces. Here we should make the ‘Employee' our interface.

Posted Date: 11/8/2013 2:44:02 AM | Location : United States







Related Discussions:- How can we simulate the concept of multiple inheritance, Assignment Help, Ask Question on How can we simulate the concept of multiple inheritance, Get Answer, Expert's Help, How can we simulate the concept of multiple inheritance Discussions

Write discussion on How can we simulate the concept of multiple inheritance
Your posts are moderated
Related Questions
Write the statements which are used to connect PHP with MySQL? Statements which can be used to connect PHP with MySQL is: $conn = mysql_connect('localhost'); echo $co

Introduction to I/O interfacing, discuss microcontrollers applications in industry. Detailed product design specifications that have sections on both hardware and software inclu

Define Array of Structures? An Array of Structures is an assortment of the same data types which are declared as structures. It is useful to store large and different number of

Develop a biomedical imaging project Project Description: This is a biomedical imaging project. Skills required are C++ Programming, Cocoa, Mac OS, Objective C

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

A: you can exploit by overloading standard operators on a class, the intuition of the users of that class. This allow users program in the language of the problem domain instead of

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

Can I explicitly call a destructor if I've allocated my object with new?


Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send