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

Assignment Help:

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.


Related Discussions:- How can we simulate the concept of multiple inheritance

Write a program for simulating jet-powered car acceleration, The absolute l...

The absolute land-speed record of 763.035 MPH (Mach 1.02) was set in October 15 1997 by a jet-powered car called Thrust SSC in the Black Rock Desert of northern Nevada. The team th

Decode the code, Smugglers are becoming very smart day by day. Now they hav...

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

What do you mean by inheritance, Inheritance is the process of forming new ...

Inheritance is the process of forming new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class,

Tree, Write algorithm and program for the conversion of a Tree to a Binary ...

Write algorithm and program for the conversion of a Tree to a Binary Tree

How do i develop a subscript operator for a matrix class?, Employ operator ...

Employ operator () instead of operator[]. While you have multiple subscripts, the cleanest way to do it is along with operator () instead of with operator[]. The reason is that

Luminous jewels polishing necklace, 1.jewels can only be removed for polish...

1.jewels can only be removed for polishing from either end of the necklace. 2.cost of polishing=sitting number*colour value of jewels.

How private instance of a class can be assigned values, Question 1: (a)...

Question 1: (a) Explain clearly the following concepts using suitable examples of your own:- (i) concrete class v/s abstract class (ii) constructor v/s over

201 it, overload assignment opertor to assign the data of one object to ant...

overload assignment opertor to assign the data of one object to anthor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd