ashish oot

16
OBJECT ORIENTED PROGRAMMING Presented By- Ashish Agrawal

Upload: ashish-agrawal

Post on 02-Dec-2014

321 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Ashish oot

OBJECT ORIENTED PROGRAMMING

Presented By-

Ashish Agrawal

Page 2: Ashish oot

Contents:-

Introduction to OOP Basic elements OOP features Polymorphism Inheritance Encapsulation Information hiding

Page 3: Ashish oot

Introduction to OOP-

Collection of interacting objects. Usually contain different type of objects each

type corresponding to a particular kind of data.

Organizes a program around it’s data(object) & a set of well defined interfaces to that data.

Describes the structure of a system in terms of objects & relationaships.

Page 4: Ashish oot

Three basic elements of OOP-

Objects

Methods or Actions

classes

Page 5: Ashish oot

Objects-

A main identity or idea. Independent with a distinct role or responsibility. an instance of a class. an employee which is real world entity we can

make an object of it and then utilize it in a program with its behaviors and actions.

All objects are distinguishable.

Page 6: Ashish oot

Methods or Actions-

Associated with the object. Depends on application. method is a subroutine (or procedure)

associated with a class. At runtime, they have access to data stored

in an instance of the class.

Page 7: Ashish oot

Class-

Contain objects with similar attributes. Define the type of their instances. Represents a noun, such as a person, place

or thing, or something nominalized. We can create any no. of objects belonging

to that class. Example-Person, process ,company are

classes etc..

Page 8: Ashish oot

OOP features-

Page 9: Ashish oot

Polymorphism-

Derive from Greek language & it means “many forms”.

One interface ,many methods. Ability to create a variable, a function, or an

object that has more than one form. Example-in a method of build(),we can make

square, rectangle , circle etc..

Page 10: Ashish oot

Polymorphism-

Page 11: Ashish oot

Inheritance-

One object require the properties of another. Properties transferred from super class to

subclass. Support the concept of hierarchical

classification. Sharing of operation & actions between

objects.

Page 12: Ashish oot

Inheritance-

Page 13: Ashish oot

Encapsulation-

Binds the data & the actions in one classor container.

mechanism for restricting access to some of the object’s components.

Protective text wrapper that prevents the code & data from being accessed by other code outside the wrapper.

Page 14: Ashish oot

Encapsulation-

Page 15: Ashish oot

Information Hiding-

ability to prevent certain aspects of a class or software component from being accessible to its clients.

protecting other parts of the program from extensive modification if the design decision is changed.

Page 16: Ashish oot

Thank You