Article No: 3
The new technology promises greater programmer productivity, better quality of software and lesser maintenance cost.
Natural modeling
OOP resembles the real world more closely than the conventional procedural programming. Hence it serves as a more natural modeling tool for programming real world problems. Object-oriented design (often referred to as OOD) involves the identification and implementation of different classes of objects and their behaviors. The objects of the system closely correspond to the real world objects, as it is observed and understood by the brain. The effort required in the conventional procedural languages, for the translation or transformation of the facts perceived by the brain into some other form suitable to the system, gets greatly reduced with OOP. Hence designing and implementing a system is much easier in OOP.
Modular design
In OOP, objects are autonomous (independent) entities in the sense that the behavior of each object is defined and implemented in the object itself and are independent of the implementation of other objects. This independence of each object naturally provides the facility of modular system design. Object-oriented design (OOD), is an approach to software design in which the modular decomposition of a system is based on the classes of its objects the system manipulates, not on the function the system performs. Modular design eases the development and maintenance of software systems.
Abstraction
Abstraction is the principle that states that programs should not make assumptions about implementations and internal representations. In OOP, each object can be viewed as a shielded and encapsulated entity because its data is private to itself (hidden from other objects) and its interaction with other objects is only through its message interface. Any object can be requested for any required information or service by sending the suitable message to it. The requester gets what it asked for without the need to bother about how the object provides the information or service. The “how” part, that is, the implementation details are internal to the object, the supplier. Thus OOP provides a high degree of abstraction, which gives an opportunity to the programmers to concentrate more on problem specification rather than be taken away by the implementation details.
Dynamic Binding
In conventional programming languages, the operators, functions, etc. are bound to their respective operations at the time of compilation. This is called static binding. However, in OOP, the binding of operator to an operation takes place at run time. This is called dynamic binding. To have an understanding of this concept, let us consider the following situation. A class named ‘shape’ has been defined along with a collection of sub-classes for different kinds of shapes, such as circles, triangles, rectangles, etc. if objects of these sub-classes need to be displayed, the display method must be defined within the class of the particular kind of shape, for each kind of shape will require different display code. Suppose that a linked list of objects of various shapes is constructed, and code is written to display each object on the list. Then the message to “display_shape” is the same for each object on the list, but it must be dynamically bound to the “display_shape” method in the proper object. Naturally the same message “display_shape” sent to different has got different responses, which is termed polymorphism. Languages that provide this sort of dynamic binding are called polymorphic languages. Dynamic binding allows abstract data types to be truly generic because it enables a single operator to have more than one operation.
Code Reusability
In OOP, inheritance provides an effective method of code reuse because the common operations defined and implemented in a class can be accessed by all the classes and instances down the whole class hierarchy. That is, as and when new classes inherit from existing classes, the code developed in super-classes gets reused. This feature leads to tremendous saving of programming effort.
Ease of Maintenance
The modular design and code reusability features also help in making software system easy to maintain. This is because by making a change in a super-class, in effect all its sub-classes are changed at once, without the tedium of identifying and implementing the same changes at a number of places. Moreover, if changes are made in one sub-class to get distinctions, the code in the super-class and the other sub-classes remains safe.
APPLICATIONS OF OOP
· Real-time systems
· Simulation and modeling
· Object oriented database
· AI and expert systems
Decision support and office automation systems.Compiled By: Chaudhary Amit V.
Comments
Post a Comment