Scholars Week 2016
Permanent URI for this community
Browse
Browsing Scholars Week 2016 by Subject "C++"
Results Per Page
Sort Options
-
ItemSimulation of Multiple Inheritance in Java(Middle Tennessee State University, 2016) Swaroop, Sonal ; Computational SciencesMultiple inheritance is a cornerstone of OOPs paradigms with benefits such as reusability (using methods of parent class by child classes), extensibility (extending the parent class logic as per business logic of the child class), data hiding (base class may keep some data private so that it cannot be altered by the derived class), and lesser compilation time. But there is no consensus among researchers on the semantics of multiple inheritance in the presence of method overriding and potential conflicts due to multiple definitions. C++, Common lisp and few other languages supports multiple inheritance while java doesn't support it. It is just to remove ambiguity, because multiple inheritance can cause ambiguity in few scenarios such as Diamond problem. James Gosling quotes “JAVA omits many rarely used, poorly understood, confusing features of C++ that in our experience bring more grief than benefit. This primarily consists of operator overloading and multiple inheritance. Java creators provided users with much easier and robust alternative to multiple inheritance i.e. interfaces, composition and abstract classes that alleviate problem during casting and constructor chaining. The primary objective of this research study is to develop a trade-off between multiple inheritance in C++ and substitution for multiple inheritance in Java and conclude if multiple inheritance is good programming technique and if Java should introduce direct implementation of multiple inheritance. The secondary objective is to introduce novel ways to substitute multiple inheritance in Java such as twin pattern and dynamic multiple inheritance, and conclude if such implementations may bring much easier and feasible alternatives to interfaces