+ All Categories
Home > Engineering > Object oriented programming concepts

Object oriented programming concepts

Date post: 24-Jan-2017
Category:
Upload: rahuld115
View: 50 times
Download: 0 times
Share this document with a friend
24
resentation on OOP Object Oriented Programming) Presented by RD
Transcript
Page 1: Object oriented programming concepts

Presentation on OOP(Object Oriented Programming)

Presented byRD

Page 2: Object oriented programming concepts

• A programming paradigm that is focused on objects and data

• as opposed to actions and logic • Objects are identified to model a system

• Objects are designed to interact with each other

What is OOP ?

Page 3: Object oriented programming concepts

• C++• Java• C#• Java• Visual Basic .NET (VB.NET)

• Objective C• PHP 5• Python• JavaScript• Smalltalk• Theta• etc

Some OOP Languages

Page 4: Object oriented programming concepts

Basic Concept Of Object Oriented Programming

Objects

Classes

Data Abstraction

Encapsulation

Inheritance

Polymorphism

Dynamic Binding

Message Passing

Page 5: Object oriented programming concepts

• They may represent a person, a place or any item that the program must handle.

• Objects are the basic run-time entities in an object-oriented system An object is entity that has state, behavior and identity . there are many.

• Every object is associated with data and functions which define meaningful operations on that object.

• Object is a real world existing entity.• Object is an Instance of a particular class.

Objects

Page 6: Object oriented programming concepts

Example

Mouse is object

Page 7: Object oriented programming concepts

Behavior

Left Click

Scrolling

Right Click

Page 8: Object oriented programming concepts

Class

• A class is an entity that helps the programmer to define a new complex data type. A class defines the data and behavior of object . In simple words , a class is a collection of object of similar type.

• Classes are user -defined data types and it behaves like built in types of programming.

• objects are variables of class.• Once A class has been defined we can create any

number of objects for that class.

Page 9: Object oriented programming concepts

Class Fruit

StrawberryPineappleBanana Apple

:

Page 10: Object oriented programming concepts

“A data abstraction is a simplified view of an object that includes only features one is interested in while hides away the unnecessary details.”

“Data abstraction becomes an abstract data type (ADT)or a user-defined type.”

Data Abstraction

Page 11: Object oriented programming concepts

Example

Program Execution

Hiding Of Data And Its

Background Detail

Output

Page 12: Object oriented programming concepts

Encapsulation

• Encapsulation is the first pillar or principal of object oriented programming.

• In simple words, "encapsulation is a process of binding data members(variable, properties)and member function(methods)into a single unit”

•And class is the best example of encapsulation.

Page 13: Object oriented programming concepts
Page 14: Object oriented programming concepts

Encapsulation

Page 15: Object oriented programming concepts

Inheritance

•The mechanism of deriving a new class from an old class is called inheritance or derivation.

•“Inheritance is the mechanism to provides the power of reusability and extendibility.”

•“Inheritance is the process by which one object can acquire the properties of another object.”

•The old class is known as base class while new class is known as derived class or sub class

Page 16: Object oriented programming concepts

Example

Page 17: Object oriented programming concepts

Inheritance

Point

Line

Parent classOr

Base class

Child classOr

Derived class

Page 18: Object oriented programming concepts

• Polymorphism is an important object oriented programming concept. This is a Greek term, means the ability to take more than one form.

Polymorphism

Page 19: Object oriented programming concepts

For Example

plus '+' is used to make sum of two number as well as it is used to combine two strings.

Operator ‘+’

5+5=10 ‘in’+’dia’=india

Page 20: Object oriented programming concepts

Dynamic Binding

•Binding means link between procedure call and code to be execute.

• It is the process of linking of a function call to the actual code of the function at run-time.

•That is, in dynamic binding, the actual code to be executed is not known to the compiler until run-time.

•It is also known late binding.

Page 21: Object oriented programming concepts

Massage Passing

• Objects can communicate with each others by passing massage same as passing massage with each other.

• Objects can send or receive message or information.

• Message passing involves the following basic steps: -Creating classes that define objects and their behavior. -Creating objects from class definitions. -Establishing communication among objects.

Page 22: Object oriented programming concepts

consider two classes product and order. the object of the product class can communicate with the order class by sending a request for placing order.

Example

order. place_order(qty_in_hand):

Object name

Function or massage Information

(Optional)

Object :order1

Massagepassing

Order_place (int q){

}

Page 23: Object oriented programming concepts

Message PassingFacultyObjectStudentObject

MgmtObject Performance

Result

Performance

Page 24: Object oriented programming concepts

Thank you


Recommended