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

What are the benefits of using friend classes, What are the benefits of usi...

What are the benefits of using friend classes? - Friend classes are useful when a class wants to hide features from users which are required only by another, tightly coupled cl

Introduction to c programming, How would you print the values of the variab...

How would you print the values of the variables words and lines so they appear in the form: There were 6040 words and 680 lines. Here, 6040 and 680 represent the values of the two

Find the internal resistance of the battery, The voltage at the terminals o...

The voltage at the terminals of a battery is 52V when no load is linked and 48.8V when a load taking 80A is connected. Find the internal resistance of the battery. What wou

Area of curve, Write a program to find the area under the curve y = f(x) be...

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. The area under a curve between two points can b

Change to palindrome, A palindrome is a string that reads the same from bot...

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

Programming, write a program that can accept numbers and perform all the fo...

write a program that can accept numbers and perform all the four arithmetic operation

Least cost method, c program to implement least cost method

c program to implement least cost method

What is buddy systems, Buddy systems : A method of handling the storage man...

Buddy systems : A method of handling the storage management problem is kept individual free lists for blocks of dissimilar sizes. Every list having free blocks of only one particul

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