Features of OOPs (Object Oriented Paradigms in JAVA)
What is OOPs ?
OOPs stands for Object Oriented Paradigms, some time people also call it as Object Oriented Programming which is quit wrong.
Features of OOPs
- Classes and Objects
- Message Passing
Let me explain some of the terms given above :-
Classes and Objects
A Class is a user defined data type which can have data members (attributes) and member methods (behavior).
e.g:- Human can be treated as a Class and following will be it’s attributes and behaviors
Class provides a template for creating objects.
Objects is a variable of class type data type. It is also known as instance of a class or run time entity.
Abstraction is a process of hiding background details and showing required / necessary things.
in JAVA it can be done by using access specifier. Some examples of Access Specifiers are :-
Encapsulation is a process of wrapping up of data members and data methods in a single unit (class).
Inheritance is a process of acquiring the attributes from previously defined class in newly created class.
Exiting class is known as parent class and newly created class is known as child class.
Polymorphism is a greek word which consist of two words Poly and Morphism where poly means many and morphism means shape of forms.
It is divided into two parts as given below :-
(Early Binding or Static Binding)
(Late Binding or Dynamic Binding)
|Method Overloading||Method Overriding|
|Constructor Overloading||Virtual Method Invocation|
here method_name is message and arguments is data