Saturday 6 February 2016

Object Oriented Programming (OOPS)

Object Oriented Programming Banner OOP

Class

     In object oriented programming basic working unit start with a class. Class is a template which comprises all the aspect of an object which is a instance of a class.

     In OOP we first create a class to solve any problem. A Class is divide into two parts first is Data section other is function or method section. In data section we get data member which are needed to solve a problem and function section we implement function section functions are defined which handle data.

Class Diagram example OOPs

Object 

Object is a physical instance of a class object uses the services of a class. Class members are access through object using. (Dot) operator.

E.g
Moniter LG;

(In example Moniter is a class and LG is object )

An object has some property which follows

State

Show the state of an object i.e. AC is ON or OFF

Behavior

The behavior of an object shows that what the actual function of an object is
:e.g. AC automatically get turn off or turn on

No comments:

Post a Comment