You are on page 1of 7

JOURNAL REVIEW Object-Oriented Software Design and Implementation

This Paper includes the Journal Review Related to Object-Oriented Programming In Partial Fulfilment of the Requirements for Bachelor of Science in Information Technology

Presented to the Mr. El Jireh P. Bibangco College of Information Technology University of Negros Occidental Recoletos

by Christine Joy Dorias 2013

Analysis of Factors Affecting Testing in Object Oriented Systems

Mrs. Sujata Khatri, Dr. R. S. Chhillar and Mrs. Arti Sangwan I. Background of the Research Journal This journal describes the various features of object oriented programming and how they affect testing of object oriented systems. Since software testing is an important software quality insurance to ensure the benefits of OOP, there are many ways on how to assure that the desired result will come out. There are many varieties of new challenges due to their features like encapsulation, inheritance, polymorphism and dynamic building. There are some processes by which a certain problem is focused. The process involves development by which the writing of the code is done in this stage and the testing is where you find out whether or not the code runs the way you expect it to carry out. The major problem for the developers is how to lessen the cost while recuperating the quality of the test of the program. The test often needs for the tester to splurge significant time to develop lengthy code to ensure that the system is working well and reasonable.


Major Theories and Principles Used 2.1 Encapsulation/Data Abstraction: Encapsulation is a method for hiding the information where interface and carrying out of a program are syntactically detached. This allows the programmer to conceal processes within the implementation and narrow the possible interdependencies with other components by means of interface. Data Abstraction is the act of representing important features without including the background information. There is no visibility of the insight of objects because of data abstraction. The data is not reachable in the outside world and only those functions which were wrapped in the class can access it. 2.2 Inheritance: Inheritance is one of the principal potency of object-oriented programming. It means that properties defined for a class are inherited by its subclasses unless otherwise stated. So, it really provides the scheme of reusability. This means that we can add supplementary features to an existing class without adapting it.


Polymorphism: Polymorphism is the capability to think more than one form, both in terms of data and operations. It is the ability of a process demonstrating different behaviour in different occurrences. The data types are the basis of how it will be performing. It lets an object reference to combine with objects of other classes. The objects action will depend on the message passed to the interface and different objects behave differently by receiving same message.


Coupling: Coupling is simple the strength of connections between the given components. Coupling between modules is largely decided during the design stage of the system that will be made for modules are decided during system design. The dependencies also differs because it is based on how tightly coupled the modules are the more tight the modules are, the more dependent they are on each other which may lead for the programmer to understand and soon, to test them. There are degrees of coupling between a module and another module. The degree of how much information is needed from the module is the basis so that the first module can be understood and modified by the other module. In presence if object oriented systems coupling may be classified as subclass coupling and temporal coupling. Coupling increases between two classes X and Y if: X has an attribute that refers to Y causing global coupling. X calls on services of an object Y again causing global coupling. X has a method that references Y causing parametric coupling. X is a subclass of (or implements) class Y causing inheritance coupling.


Cohesion: Cohesion is a measure of how close are the methods which are related to local instance variables within the class. A certain class can e considered to have a high cohesion if the methods that serve the given class to contribute in a single well-defined task and likely to be similar in many aspects. Modules having high cohesion might be preferable for high cohesion is associated with some advantageous features of software that includes reliability, reusability, and understandability while low cohesion is associated with adverse features like being difficult to maintain, difficult to test, difficult to reuse and also difficult to understand. A method is considered less cohesive if the functionalities embedded in a class and accessed through its methods. Methods perform many activities, often uses the unrelated sets of data. Low cohesion means not-so-good design or poor organization of a class and thus increasing the difficulty of a class and

rising the testing effort. This results in making the module less understandable and difficult to maintain if ever there are changes. The lack of cohesion in methods results in decreasing the testability of the class. So, the testability of a certain class is directly proportional to cohesion. Cohesion is often contrasted with coupling, high cohesion often correlates with loose coupling and low cohesion relates with strong coupling. 2.6 Abstract Classes: Abstract classes are the way to push the common implementation into the base class so that the difficulty of adding of the elements will reduce because lot of the common interfaces are already implemented. Only the classes which are derived from the abstract class can be easily tested (but errors can be present also in the super class for example abstract class). For this reason, the programmer must include an abstract test class for every abstract class. III. Illustrative Examples An example related to this is the use of data abstraction. In this example, all the processes are under the premises of the class Employee the class BigDecimal is used to hold a certain property. Then the variable salary is used to obtain the properties of the class BigDecimal. In public BigDecimal getSalary(), the one being returned is the value of the variable salary. Then, in the main method, variable e is declared as a new Employee, then sal is also declared and initialized to have the value being returned by the public getSalary(). BigDecimal


Implication in the Field of Computing Sometimes, there are a lot of errors we are encountering everytime we run a certain program.

Errors like we lack terminators, having wrong declarations, wrong algorithms and sometimes, incorrect usage of the case of letters. Usually, when we encounter these types of errors, we are easily overwhelmed by the results so we cram like we dont know what to do or what are the possible solutions are. So, this is purely made to enhance and let us solve the faults so we can come up to our desired result. And so, this just proves that we have many ways to solve a certain program. V. Reaction and Conclusion This journal really made me think twice. This just proved me that there are a lot of ways to solve a problem or debug the error if there are any after running the program. Object oriented introduces new testing challenges which are those that cant be easily tackled on the preceding skills that were used in conventional. The object-oriented source code is really harder to test than that of procedure-oriented due to the disintegration of functionalities that can result from inheritance and dynamic binding, where control flow and state control are distributed over several classes. The static testing skills are less effective as to compare to dynamic testing skills because of these difficulties,. Encapsulation affects controllability and observability as discussed above which reduce testability of systems. Inheritance and polymorphism increase the class dependency that this makes the integration testing more challenging. Hence, we will need to put more emphasis and importance on the integration testing than on the unit testing. Therefore, to outdo the quality provided by conventional testing techniques, we need to work out for more testing tools that are efficient and easy for us to bypass these obstacles. Also, since there are lots of possible ways in order for us to obtain our desired result, we do need to attain more effective techniques and methods to rise up the testability of the system so that it will be east for the software testing.