Abstract
Two 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.
Highlights
Inheritance is one of the fundamental concepts of objectoriented (OO) software development
The metrics‟ values presented in Table 1 show that the Java implementation has higher values for Weighted Methods per Class (WMC), CBO, Response for a Class (RFC), and Lack of Cohesion in Methods (LCOM) for all four classes inheriting from two parents
Using Java, Python and C++, we www.ijacsa.thesai.org presented the effect of the programming language on the resultant software
Summary
Inheritance is one of the fundamental concepts of objectoriented (OO) software development. Tempro and Biddle [12] suggest that delegation can be used to simulate multiple inheritance in Java Their solution is similar to that presented by Thirunarayan et al [11] as shown in Program 1(a) in which the class B is incorporated as an inner class within C and declaring an object b to implement it. They demonstrate that protocol conformance can be achieved by single inheritance and the use of Java‟s capability that allows multiple implementation of Java interface classes. We review the metrics and we analyze the complexity and reusability of Python, Java, and C++
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have