Professional Documents
Culture Documents
OOPS Concepts
OOPS Concepts
OOPS Concepts
Each teacher is having some properties like teacher_id, Name, salary, Subject
and Each teacher teaches does some actions like teach_subject, coduct_exam
OK..... Now....
Object: Objcect is real world entity, It must have some properties and it does Some actions..
Example: Naveen, Kiran, Mahesh are Obects
Class: It is a blue print for creating Objects. (or) It is a model for creating objects.
Example: Teacher
Abstraction:
Let us take an example:
In a room if we want to swith on the fan... we just need the Switch and the fan is running.....
we don't bother about the cable, from where the power is supplying etc....
So, these things are hided from us....
just we are able to see only switch and the fan is working or not..
Defination: Showing essential parts and hinding the implementation from the end user is called
abstraction.
Encapsulation:
Let us take an Example:
Different items like battery, display, primary camara, secondary camara, sim tray etc...
Defination: Binding up differnet properties as a single unit and it performs some action(s).