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
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
- 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
Attributes | Behaviors |
2 eyes | see() |
2 legs | walk() |
2 ears | hear() |
1 mouth | talk() |
1 nose | smell() |
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
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 :-
- private
- protected
- public
- default
Encapsulation
Encapsulation is a process of wrapping up of data members and data methods in a single unit (class).
Inheritance
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
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 :-
Compile Time (Early Binding or Static Binding) |
Run Time (Late Binding or Dynamic Binding) |
Method Overloading | Method Overriding |
Constructor Overloading | Virtual Method Invocation |
Inheritance |
Message Passing
syntax: objectname.method_name(arguments)
here method_name is message and arguments is data
SignUp Now to Get FREE Access to our All in One Digital Marketing Platform!
We will continue to update Front; if you have any questions or suggestions, please contact us!
Follow us on Facebook, Instagram, Twitter, Pinterest, Linkedin, YouTube, and Medium.
erbhaveshkumar123
I create advanced website builders made exclusively for web developers.
3 Comments
As a Special Education teacher this resonates so well with me. Fighting with gen ed teachers to flatten for the students with learning disabilities. It also confirms some things for me in my writing.
ReplySince our attention spans seem to be shrinking by the day — keeping it simple is more important than ever.
ReplyPost a comment
Stay in the know
Get special offers and the latest news updates from ElanceMarket™.