SlideShare a Scribd company logo
2
Most read
3
Most read
12
Most read
Object-Oriented Programming Concepts  - Khursheed Mohammed
Today’s Presentation    What is an Object?      What is a Class?    What is a Message?    Requirements of Object-Oriented language    Step by step explanation
What is an Object?   An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. Visual representation of a software object   A  bicycle modeled as a software object
What is a Class?   A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind.     Class is an implementation of an abstract data type and so encapsulates both data and operations.    Object is run-time instance of class. Classes just sit there, objects do the real work. Memory is allocated for Objects not for Classes.
What is a Message?   Software objects interact and communicate with each other using messages.     The object to which the message is addressed (YourBicycle)     The name of the method to perform (changeGears)     Any parameters needed by the method ( lowerGear )
To be object oriented, a language must support     Encapsulation    Inheritance    Dynamic Binding Some of the popular OO languages are C++ Smalltalk Java Eiffel FORTRAN90 CLOS(Common Lisp Object System) Ada95 Modula-3
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: X X X X Public X X X Protected X Private World Package Subclass Class Specifier
What is 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
Properties:  Each subclass  inherits  state (in the form of variable declarations) from the superclass.   Subclasses can add variables and methods to the ones they inherit from the superclass. Subclasses can also  override  inherited methods and provide specialized  implementations for those methods.   You are not limited to just one layer of inheritance. The inheritance tree, or class  hierarchy , can be as deep as needed.   Benefits:  Re-Usability Subclasses provide specialized behaviors from the basis of common elements provided by the superclass. Through the use of inheritance, programmers can reuse the code in the superclass many times.   Can define Abstract Classes Programmers can implement superclasses called  abstract classes  that define "generic" behaviors.
A B C A B C A-1 A-2 B-1 B-2 AB Multi-level Inheritance Multiple Inheritance Multiple Multi-level Inheritance Types of Inheritance:
Dynamic Binding:    Dynamic binding occurs when the type of variable changes at  run-time. A common way for a variable to change its type is via assignment. Bike:= MoutainBike  is safe MountainBike:=Bike  is not safe MountainBike  is declared to have all the features of  Bike  so the assignment does no harm.    A variable that starts life of the type  Bike  may be attached to any object that is a kind of  Bike , including  MountainBike , RacingBike ,…    A variable that starts life of the type  MountainBike  can only be attached to  MountainBike  objects but does not include  RacingBike  or general  Bike.
Polymorphism:    The ability to appear in many forms.    In object-oriented programming,  polymorphism  refers to a programming language's ability to process objects differently depending on their data type or class.  It is the ability to redefine  methods  for  derived classes.   E.g. e-bike Acceleration system. Electronically / Mechanically
Acknowledgements Dr. Yitung Chen Dr. Hsuan-Tsung (Sean) Hsieh
CONCLUSION

More Related Content

PDF
Introduction to oops concepts
Nilesh Dalvi
 
PDF
List , tuples, dictionaries and regular expressions in python
channa basava
 
PPTX
Characteristics of OOPS
abhishek kumar
 
PPTX
oops concept in java | object oriented programming in java
CPD INDIA
 
PPT
Object-oriented concepts
BG Java EE Course
 
PPT
Core java slides
Abhilash Nair
 
PPTX
Oop c++class(final).ppt
Alok Kumar
 
PPT
Java tutorial PPT
Intelligo Technologies
 
Introduction to oops concepts
Nilesh Dalvi
 
List , tuples, dictionaries and regular expressions in python
channa basava
 
Characteristics of OOPS
abhishek kumar
 
oops concept in java | object oriented programming in java
CPD INDIA
 
Object-oriented concepts
BG Java EE Course
 
Core java slides
Abhilash Nair
 
Oop c++class(final).ppt
Alok Kumar
 
Java tutorial PPT
Intelligo Technologies
 

What's hot (20)

PPTX
object oriented Programming ppt
Nitesh Dubey
 
PPTX
Object oriented programming
Amit Soni (CTFL)
 
PPT
Oops ppt
abhayjuneja
 
PPTX
Object Oriented Programming
Iqra khalil
 
PPT
Introduction to oop
Kumar
 
PPTX
Inheritance in c++
Vineeta Garg
 
PPT
Basic concepts of object oriented programming
Sachin Sharma
 
PPTX
Introduction to oop
colleges
 
PPTX
Need of object oriented programming
Amar Jukuntla
 
PPTX
OOPS Basics With Example
Thooyavan Venkatachalam
 
PPTX
concept of oops
prince sharma
 
PPTX
OOPS In JAVA.pptx
Sachin33417
 
PPTX
Procedural vs. object oriented programming
Haris Bin Zahid
 
PDF
Operator overloading
Pranali Chaudhari
 
PPTX
Polymorphism in c++(ppt)
Sanjit Shaw
 
PPTX
Introduction to Object Oriented Programming
Moutaz Haddara
 
PPTX
Advance oops concepts
Sangharsh agarwal
 
PPTX
Chapter 05 classes and objects
Praveen M Jigajinni
 
PPTX
Classes, objects in JAVA
Abhilash Nair
 
PPSX
Data Types & Variables in JAVA
Ankita Totala
 
object oriented Programming ppt
Nitesh Dubey
 
Object oriented programming
Amit Soni (CTFL)
 
Oops ppt
abhayjuneja
 
Object Oriented Programming
Iqra khalil
 
Introduction to oop
Kumar
 
Inheritance in c++
Vineeta Garg
 
Basic concepts of object oriented programming
Sachin Sharma
 
Introduction to oop
colleges
 
Need of object oriented programming
Amar Jukuntla
 
OOPS Basics With Example
Thooyavan Venkatachalam
 
concept of oops
prince sharma
 
OOPS In JAVA.pptx
Sachin33417
 
Procedural vs. object oriented programming
Haris Bin Zahid
 
Operator overloading
Pranali Chaudhari
 
Polymorphism in c++(ppt)
Sanjit Shaw
 
Introduction to Object Oriented Programming
Moutaz Haddara
 
Advance oops concepts
Sangharsh agarwal
 
Chapter 05 classes and objects
Praveen M Jigajinni
 
Classes, objects in JAVA
Abhilash Nair
 
Data Types & Variables in JAVA
Ankita Totala
 
Ad

Similar to Object Oriented Programming Concepts (20)

PPTX
CSE-Object-Oriented-Programming-PPT.pptx
dslalitbusiness2589
 
PDF
Objectorientedprogrammingconcepts
GizawAssabe
 
PDF
Cs2305 programming paradigms lecturer notes
Saravanakumar viswanathan
 
PPTX
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
AnkurSingh340457
 
PPTX
OOP-Advanced Programming with c++
Mohamed Essam
 
PPTX
OOP Introduction with java programming language
Md.Al-imran Roton
 
PPTX
Object-Oriented Programming.pptx
ssusereae59d
 
PPTX
OOP-Advanced_Programming.pptx
Mohamed Essam
 
PPT
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Vikas Jagtap
 
PDF
Oops concepts
ACCESS Health Digital
 
PPTX
Object Oriented Programming Language is an oop
sanaiftikhar23
 
PDF
Classes are blueprints for creating objects
SSSs599507
 
PDF
Data Structure Interview Questions & Answers
Satyam Jaiswal
 
PPTX
Object Oriented Programming fundamentals.pptx
sanaiftikhar23
 
PPT
introduction-to-object-oriented-programming.ppt
hijat789
 
PPT
OOP for java
mha4
 
PPT
introduction-to-object-oriented-programming.ppt
RamadossSundaramoort1
 
PPT
introduction-to-object-oriented-programming.ppt
kaavyashruthi
 
CSE-Object-Oriented-Programming-PPT.pptx
dslalitbusiness2589
 
Objectorientedprogrammingconcepts
GizawAssabe
 
Cs2305 programming paradigms lecturer notes
Saravanakumar viswanathan
 
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
AnkurSingh340457
 
OOP-Advanced Programming with c++
Mohamed Essam
 
OOP Introduction with java programming language
Md.Al-imran Roton
 
Object-Oriented Programming.pptx
ssusereae59d
 
OOP-Advanced_Programming.pptx
Mohamed Essam
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Vikas Jagtap
 
Oops concepts
ACCESS Health Digital
 
Object Oriented Programming Language is an oop
sanaiftikhar23
 
Classes are blueprints for creating objects
SSSs599507
 
Data Structure Interview Questions & Answers
Satyam Jaiswal
 
Object Oriented Programming fundamentals.pptx
sanaiftikhar23
 
introduction-to-object-oriented-programming.ppt
hijat789
 
OOP for java
mha4
 
introduction-to-object-oriented-programming.ppt
RamadossSundaramoort1
 
introduction-to-object-oriented-programming.ppt
kaavyashruthi
 
Ad

More from thinkphp (14)

PPT
Knut Morris Pratt Algorithm
thinkphp
 
PPT
String kmp
thinkphp
 
PPT
String searching
thinkphp
 
PDF
Functional programming in java script
thinkphp
 
PDF
Practical functional java script
thinkphp
 
PDF
Javascript patterns
thinkphp
 
PDF
Placemaker
thinkphp
 
ODP
PHP 5.3 And PHP 6 A Look Ahead
thinkphp
 
PDF
Atom Web Services
thinkphp
 
PDF
Json Rpc Proxy Generation With Php
thinkphp
 
PDF
Php And Web Services
thinkphp
 
PDF
Ajax Introduction Presentation
thinkphp
 
PPT
OOP
thinkphp
 
PPT
Principii Poo
thinkphp
 
Knut Morris Pratt Algorithm
thinkphp
 
String kmp
thinkphp
 
String searching
thinkphp
 
Functional programming in java script
thinkphp
 
Practical functional java script
thinkphp
 
Javascript patterns
thinkphp
 
Placemaker
thinkphp
 
PHP 5.3 And PHP 6 A Look Ahead
thinkphp
 
Atom Web Services
thinkphp
 
Json Rpc Proxy Generation With Php
thinkphp
 
Php And Web Services
thinkphp
 
Ajax Introduction Presentation
thinkphp
 
Principii Poo
thinkphp
 

Recently uploaded (20)

PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PPTX
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PDF
Wings of Fire Book by Dr. A.P.J Abdul Kalam Full PDF
hetalvaishnav93
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
DOCX
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Landforms and landscapes data surprise preview
jpinnuck
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Wings of Fire Book by Dr. A.P.J Abdul Kalam Full PDF
hetalvaishnav93
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 

Object Oriented Programming Concepts

  • 2. Today’s Presentation  What is an Object?  What is a Class?  What is a Message?  Requirements of Object-Oriented language  Step by step explanation
  • 3. What is an Object? An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. Visual representation of a software object A bicycle modeled as a software object
  • 4. What is a Class? A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind.  Class is an implementation of an abstract data type and so encapsulates both data and operations.  Object is run-time instance of class. Classes just sit there, objects do the real work. Memory is allocated for Objects not for Classes.
  • 5. What is a Message? Software objects interact and communicate with each other using messages.  The object to which the message is addressed (YourBicycle)  The name of the method to perform (changeGears)  Any parameters needed by the method ( lowerGear )
  • 6. To be object oriented, a language must support  Encapsulation  Inheritance  Dynamic Binding Some of the popular OO languages are C++ Smalltalk Java Eiffel FORTRAN90 CLOS(Common Lisp Object System) Ada95 Modula-3
  • 7. 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: X X X X Public X X X Protected X Private World Package Subclass Class Specifier
  • 8. What is 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
  • 9. Properties:  Each subclass inherits state (in the form of variable declarations) from the superclass. Subclasses can add variables and methods to the ones they inherit from the superclass. Subclasses can also override inherited methods and provide specialized implementations for those methods. You are not limited to just one layer of inheritance. The inheritance tree, or class hierarchy , can be as deep as needed. Benefits:  Re-Usability Subclasses provide specialized behaviors from the basis of common elements provided by the superclass. Through the use of inheritance, programmers can reuse the code in the superclass many times.  Can define Abstract Classes Programmers can implement superclasses called abstract classes that define "generic" behaviors.
  • 10. A B C A B C A-1 A-2 B-1 B-2 AB Multi-level Inheritance Multiple Inheritance Multiple Multi-level Inheritance Types of Inheritance:
  • 11. Dynamic Binding:  Dynamic binding occurs when the type of variable changes at run-time. A common way for a variable to change its type is via assignment. Bike:= MoutainBike is safe MountainBike:=Bike is not safe MountainBike is declared to have all the features of Bike so the assignment does no harm.  A variable that starts life of the type Bike may be attached to any object that is a kind of Bike , including MountainBike , RacingBike ,…  A variable that starts life of the type MountainBike can only be attached to MountainBike objects but does not include RacingBike or general Bike.
  • 12. Polymorphism:  The ability to appear in many forms.  In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. It is the ability to redefine methods for derived classes. E.g. e-bike Acceleration system. Electronically / Mechanically
  • 13. Acknowledgements Dr. Yitung Chen Dr. Hsuan-Tsung (Sean) Hsieh