1. ARYA COLLEGE OF ENGINEERING & I.T.
Object Oriented
Concept
Submitted by: Dhiraj Kumar
Class: ECE-A
Roll no. : 12EAREC052
Submitted to:
Dr. Kirti Vyas
2. Introduction :
We can define “object oriented programing as an
approach that provides a way of modularizing
programs by creating partitioned memory area for
both data and functions that can be used as a template
for creating copies of such modules on demand”.
4. Class
• A class is an abstract definition of an object.
• Defines how would the object look like when created.
• The object type.
• Think of classes like the patents of actual inventions.
7. Object
• An object is the actual entity instance lives in memory and
capable of doing real operations.
• Created (instantiated) according to the abstract definition of a
class.
• Think of objects like some invention created according to
some patent.
16. State
• The value of an attribute (variable) of the object.
• Describes some object’s characteristics.
• Ex: Car.color = red
• Adjectives.
17. Method
• An object’s ability to do some operation.
• Implements some functionality.
• Invoked by the same object or other interacting objects in the
system.
• Ex: car.accelerate()
• Verbs.
18. Message Passing
• The process by which an object:
– Sends data to another object.
– Asks the other object to invoke a
method.
• In other words, objects talk to each others
via messages.
19. Encapsulation
• Packaging an object's variables within the protective custody
of its methods is called encapsulation.
• Often, for practical reasons, an object may wish to expose
some of its variables or hide some of its methods.
• Access Levels:
20. Inheritance
• A class inherits state and behavior from its superclass.
Inheritance provides a powerful and natural mechanism for
organizing and structuring software programs.
Super Class
Subclasses
21. OO Concepts - Abdalla Mahmoud
Abstraction & Inheritance
Man
Suzuki
Woman
BMW
Car Human
22. Polymorphism
• Different objects share the same interface (e.g: same method
names).
• Different functionalities /implementations.
• One object may have several interfaces.
• One object can be treated as if it’s an instance from several
types (classes).