Académique Documents
Professionnel Documents
Culture Documents
What is OOP?
Object oriented program is a programming approach in which a problem domain is characterized as a set of objects that have a specific attributes and behavior. The objects are manipulated with a collection of functions called method or services. The objects are categorized into classes and subclasses
What is an Object?
Definitions
An object has state, behavior, and identity; the structure and behavior of similar objects are defined in their common class; the terms instance and object are interchangeable An object is defined via its class, which determines everything about an object. Objects are individual instances of a class
What is a Class?
A class is a specification of structure (instance variables), behavior (methods), and inheritance (parents, or recursive structure and behavior) for objects.
Features of OOP
Data Encapsulation Inheritance
Polymorphism
Data Abstraction
Data Encapsulation
Encapsulation is the process of hiding all of the details of an object that do not contribute to its essential characteristics
Inheritance
Inheritance is the mechanism which allows a class A to inherit properties of a class B. We say ``A inherits from B''. Objects of class A thus have access to attributes and methods of class B without the need to redefine them
Polymorphism
Polymorphism is a characteristic that greatly reduces the effort required to extend an existing
OO system
Data Abstraction
A class A is called abstract class if it is only used as a superclass for other classes. Class A only specifies properties. It is not used to create objects. Derived classes must define the properties of A
JAVA
VisualWorks
VisualAge
Conventional Vs OO Approaches
Modeling Dimensions that may be used to compare various conventional and ObjectOriented analysis methods: Identification/ Classification of entities
General to specific and whole to part entity relationships Other entity relationships Contd..
Benefits of OOA
Maintainability: The ease with which a software system or component can be modified to correct faults, improve performance, or other attributes, or adapt to a changed environment
Reusability: The degree to which a software module or other work product can be used in more than one computing program or software system Productivity:The quality or state of being productive
Conventional Vs OO Approaches
Fichman and Kemerer suggest ten design modeling components that may be used to compare various conventional and OO design methods
Representation of hierarchy of modules Specification of data definitions Specification of procedural logic Contd.
Definition of classes
Assignment of operations to classes
Testing is unnecessary
Testing gets in the way
Testing is inconsistent with a commitment to quality Testing is the same Conventional testing is useless for objects
OO structure matters