Skip to main content
Object Orientation detail in JAVA
- Object-oriented(OO) means that we organize software as a collection of isolated objects that incorporate both data structure and behavior.
- Object Orientation is about viewing and modeling the word/system as a set of interacting and interrelated objects.
- Characteristics of OO approach include four aspects: identity, classification, inheritance and polymorphism.
i. Identity
- Identity means data is quantized into discrete and distinguishable entities. Each object is having its own inherent identity.
- Objects are distinct even if all their attribute values are identical.
- Objects can be concrete, such as a file in a file system, or conceptual, such as a scheduling policy in a multiprocessing operating system.
ii.Classification
- Abstract entities with the same structure and behavior are grouped into classes.
- A class is an abstraction that describes properties important to an application and ignores the rest.
- Each class describes a possibly infinite set of individual objects.
- Each object is said to be an instance of its class.
- Each class describe infinite set of individual object and each object is instance of class.
iii. Inheritance
- Sharing of attributes and operations based on a hierarchical relationship.
- Each subclass inherits all features of super class and adds its unique features.
- A super class has general information that sub-classes refine and elaborate.
- Each subclass incorporates, or inherits all the features of its super class and adds its own unique features.
- Subclasses need not repeat the features of the super class.
- Example, Scrolling Window, Fixed Window and subclasses of Window.
iv. Polymorphism
- Polymorphism means that the same operation may behave differently for different classes.
- Polymorphism - a Greek term means ability to take more than one form.
- The same operation may behave differently on different classes.
- An operation is procedure or transformation that an object performs or is subject to.
- Implementation of operation by a specific class is called method.