Ojected Oriented Programming
Core OOP concepts
1)Class
2) Object
3)Inheritance
4) Polymorphism
5)Encapsulation
6)Abstraction
7)Interface
Object
It is a real time entity, combination of states and Behaviour
Object is a memory reference of a class
Object is the instance of class
Eg: car, bike, dog
Class
Class is a template/blueprint or prototype (eg.invitation)
Class is a overview
Polymorphism
Poly means many ; morphism means changing faces. It has two methods
Method overloading
Method overriding
I)Method overloading - definition is different of this two .Activity (with what)
eg: write(pen) write(pencil) from this example the activity is same for this two but the things is different.
II) Method overriding - different definition . Activity(by whom)
Eg: parent(cook) child(cook) from this example the activity of the person is same but the taste is different both food has a different taste
Encapsulation
Data protection,Data hiding, Data binding
Store our information privately, activities also private.
Eg: secret-->friends, account-->only me
Data binding: information-->personal,friends,relatives,public
Inheritance
Generation characteristics (efficient memory management)
Heritage
Eg: grand parent-->parent-->child
Abstraction
Showing only necessary data hiding unwanted data. eg: body
Interface : rules
Comments
Post a Comment