[PDF] [PDF] A Comparative Study on the Effect of Multiple Inheritance

comparing the complexity and reusability of commonly used object-oriented implementation of multiple inheritance in Java, C++, and Python Section 3 



Previous PDF Next PDF





[PDF] A Comparative Study on the Effect of Multiple Inheritance

comparing the complexity and reusability of commonly used object-oriented implementation of multiple inheritance in Java, C++, and Python Section 3 



[PDF] Java and C++ A critical comparison

9 mar 1997 · A critical comparison I have been a long time programmer in C++, and have just The designers of Java avoided multiple inheritance



[PDF] CZ: Multimethods and Multiple Inheritance Without Diamonds

Virtual inheritance in C++ is designed as one solution for C to inherit addresses the object initialization problem and a comparison to related language  



Metamodeling semantics of multiple inheritance - ScienceDirect

Furthermore, the absence of Java-like multiple inheritance of interfaces was viewed as a solutions for them; and (iii) formally discussing and comparing the different specifications of many OO languages (C++, Java, Clos, Python, C#, etc )



[PDF] A Comparison of the Object-Oriented Features of Ada 95 and Java?

supports single inheritance and also offers a partial form of multiple inheritance through a feature known as an “interface” A key property of Java is that objects 



[PDF] Advanced Concepts in Object-Oriented Programming - Harvard SEAS

The difference between OOP and “records of functions with shared private state” is Then fancy stuff: multiple-inheritance, interfaces, static overriding unlike in Java or C++) Consider if e1 then e2 else e3 (or in C++/Java, e1 ? e2 : e3)



[PDF] Comparative Study of C, C++, C# and Java Programming - CORE

Comparison of C, C++, C#, and Java from theoretical aspects Neither C# nor Java allows multiple inheritance which means each class can only inherit from 



[PDF] CZ: Multiple Inheritance Without Diamonds - Carnegie Mellon

when A has fields—should C inherit multiple copies of the fields or just one? Virtual inheritance in C++ is designed as one solution comparing to mixins ) Now 



[PDF] Study on Function Ambiguity in Inheritance Using - Amity University

Using Object Oriented Programming with C++, Java and C# ambiguity in inheritance in C++ [3] [4] [5], Java and C# [6] Keywords: Class Namely Single Inheritance, Multiple Inheritance multiple Inheritance, there is a possibility that a class may The difference between implementation language construct in these 



pdf Searches related to compare multiple inheritance in java and c+

This paper articulates the comparison of inheritance in java and C++ on the basis of eleven parameters Keywords - C++ Java derived class base class 1 INTRODUCTION Inheritance is one of the important features of Object- Oriented Programming (OOP)

[PDF] compétences langage oral cycle 2

[PDF] compile time polymorphism in java

[PDF] compiler explorer

[PDF] complete english grammar books free download pdf

[PDF] complete list of linux commands pdf

[PDF] complete spoken english course pdf

[PDF] completez avec etre ou avoir

[PDF] complex exponential fourier series calculator

[PDF] complex exponential fourier series in matlab

[PDF] complex fft matlab

[PDF] compo géo la france en ville

[PDF] composite materials are classified based on

[PDF] composition geo la france en ville

[PDF] comprehensive list of linux commands

[PDF] comprendre le langage corporel du chat

(IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 8, No. 6, 2017

109 | P a g e

www.ijacsa.thesai.org

A Comparative Study on the Effect of Multiple

Inheritance Mechanism in Java, C++, and Python on

Complexity and Reusability of Code

Fawzi Albalooshi

Department of Computer Science

University of Bahrain

Kingdom of Bahrain

Amjad Mahmood

Department of Computer Science

University of Bahrain

Kingdom of Bahrain

AbstractTwo of the fundamental uses of generalization in object-oriented software development are the reusability of code and better structuring of the description of objects. Multiple inheritance is one of the important features of object-oriented methodologies which enables developers to combine concepts and increase the reusability of the resulting software. However, multiple inheritance is implemented differently in commonly used programming languages. In this paper, we use Chidamber and Kemerer (CK) metrics to study the complexity and reusability of multiple inheritance as implemented in Python, Java, and C++. The analysis of results suggests that out of the three languages investigated Python and C++ offer better reusability of software when using multiple inheritance, whereas Java has major deficiencies when implementing multiple inheritance resulting in poor structure of objects. KeywordsReusability; complexity; Python; Java; C++; CK metrics; multiple inheritance; software metrics

I. INTRODUCTION

Inheritance is one of the fundamental concepts of object- oriented (OO) software development. There are two types: single and multiple. Single inheritance is the ability of a class to inherit the features of a single super class with more than a single inheritance level i.e. the super class could also be a subclass inheriting from a third class and so on. Multiple inheritance, on the other hand, is the ability of a class to inherit from more than a single class. For example, a graphical image could inherit the properties of a geometrical shape and a picture. Stroustrup [1], [2] states that multiple inheritance allows a user to combine independent concepts represented as classes into a composite concept represented as a derived class. For example, a user might specify a new kind of window by selecting a style of window interaction from a set of available interaction classes and a style of appearance from a set of display defining classes. There is wide debate on the usefulness of multiple inheritance and whether the complexities associated with it justify its implementation. Though some researchers such as Stroustrup [1], [2] are convinced that it can easily be implemented. He states that multiple inheritance avoids replication of information that would be experienced with single inheritance when attempting to represent combined concepts from more than one class. Booch [3] asserts that it is good to have inheritance when you need it. According to Booch, there are two problems associated with multiple inheritance and they are how to deal with name collisions from super classes, and how to handle repeated inheritance. He presents solutions to these two problems. Other researchers [4] suggest that there is a real need for multiple inheritance for efficient object implementation. They justify their claim referring to the lack of multiple subtyping in the ADA 95 revision which was considered as a deficiency that was rectified in the newer version [5]. It is clear that multiple inheritance is a fundamental concept in object-orientation. The ability to incorporate multiple inheritance in system design and implementation will better structure the description of objects modeling, their natural status and enabling further code reuse as compared to single inheritance. Java, C++, and Python are three widely used OO programming languages in academia and industry. Java has secured its position as the most widely used OO programming language due to many reasons including its network-centric independent platform and powerful collection of libraries known as Java APIs (Application Programming Interface). Nevertheless, Java has a limitation when it comes to implementing multiple inheritance. C++ is another widely used programming language and is considered to be the most comprehensive due to its support to a variety of programming styles such as procedural, modular, data abstraction, object- oriented and generic programming [1], [2]. It supports single and multiple inheritance in which a child class can inherit the properties of a single parent class and multiple parents. Python is a powerful object-oriented general-purpose programming language created by Guido van Rossum [6]. It has wide range of applications from Web development to scientific and mathematical computing to desktop graphical user Interfaces. It is a simple language; open source, portable across platforms, extensible and embeddable, interpreted, and has large standard libraries to solve common tasks. Similar to C++ single and multiple inheritance is supported by Python. An empirical study on the use of inheritance in Python systems was carried out by Orru et al. [7]. More details about the implementation of multiple inheritance in these languages are discussed in

Section 2.

To the best of our knowledge there has been no studies comparing the complexity and reusability of commonly used object-oriented programming languages. In this paper, we present implementation of multiple inheritance and use CK (IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 8, No. 6, 2017

110 | P a g e

www.ijacsa.thesai.org (Chidamber and Kemerer) [8] metrics to study the complexity and reusability of multiple inheritance as implemented in Python, Java, and C++. For this purpose, we used a sample design and code from real-life systems involving multi-level multiple inheritance and its implementation. The rest of the paper is organized as: Section 2 presents the implementation of multiple inheritance in Java, C++, and Python. Section 3 details the complexity and reusability analysis for the three languages. It discusses software metrics and how they are applied in the measurement of the complexity and reusability followed by a discussion of the results. In Section 4 we address the current use of multiple inheritance in open source software and the impact of such practice on its complexity and reusability and Section 5 concludes the paper.

II. MULTIPLE INHERITANCE IMPLEMENTATION IN JAVA,

C++, AND PYTHON

In Java, a class can singly inherit the properties of another class. Java does not support multiple inheritance of classes, but it supports multiple inheritance of interfaces [9]. A strong reason that prevents Java from extending more than one class is to avoid issues related to multiple inheritance of attributes implementing multiple inheritance in which a class inheriting from two or more super classes with a common ancestor. The super classes inherit the common ancestor method(s) and/or attribute(s). This results to their child class to inherit multiple versions of the same method(s) and/or attribute(s) (one from each super class). Thus, a conflict arises during program execution involving the child class on which version of the same inherited method/attribute to use. Java interfaces do not have a state, thus do not pose such a threat. The more recent Java 8 compiler resolves the issue of which default method a particular class uses, however this solution has its limitations. inheritance, researchers investigated compromised solutions. Two of the most commonly used approaches are termed as approximation [11] and delegation [12] of multiple inheritance. C++ overcomes the diamond problem with the use of virtual inheritance. Program 1(b) shows the implementation of multiple inheritance in C++ for the Java example shown in Program 1(a). In Python the diamond problem is nicely LV EDVHG RQ WKH quotesdbs_dbs9.pdfusesText_15