ashish oot
DESCRIPTION
TRANSCRIPT
OBJECT ORIENTED PROGRAMMING
Presented By-
Ashish Agrawal
Contents:-
Introduction to OOP Basic elements OOP features Polymorphism Inheritance Encapsulation Information hiding
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.
Three basic elements of OOP-
Objects
Methods or Actions
classes
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.
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.
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..
OOP features-
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..
Polymorphism-
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.
Inheritance-
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.
Encapsulation-
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.
Thank You