OOPS Concepts

You might also like

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 2

OOPS

(Object Oriented Programming System)


Genarally, any Programming Language Which follows OOPS rules That Programming Language is called
Object Oriented Programming Language.
Basically OOPS rules are:
Class
Object
Abstraction
Encapsulation
Polymorphism
Inheritance
Lets Understand One by One Clearly,

Class and Object:

Let us take an example, In a Scholl there are 3 teachers

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..

This concept is known as Abstraction.

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).

You might also like