Object Oriented Programming - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Object Oriented Programming

Description:

A class is a blueprint or prototype that defines the variables and methods ... a blueprint of a bicycle is not a bicycle. What are messages? ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 10
Provided by: irfanp
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Programming


1
Object Oriented Programming
  • Irfan Pyarali
  • http//www.cs.wustl.edu/irfan/cst310/Lecture2.ppt

2
Object Orientation Real or hype
  • A little of both
  • False claims and misinformation have led to
  • confused consumers
  • mistrust of object-oriented technology

3
Characteristics of OOP
  • Encapsulation
  • to gather data representation and behavior into
    one entity
  • has interface and implementation
  • Inheritance
  • derive a new data type from an existing one
  • reuse, don't reinvent.
  • Polymorphism
  • customize the behavior of an object

4
What is an object?
  • An object is a software bundle of variables and
    related methods
  • Real-world objects
  • a dog, a desk, a television set, a bicycle
  • Objects have
  • state
  • behavior

5
What is a class?
  • Many objects of the same kind
  • A class is a blueprint or prototype that defines
    the variables and methods common to all objects
    of a certain kind.

6
Objects versus classes
  • Objects are instances of classes
  • a blueprint of a bicycle is not a bicycle

7
What are messages?
  • Software objects interact and communicate with
    each other using messages.
  • A single object alone is generally not very
    useful
  • Usually appears as a component of a larger
    program
  • Through the interaction of these objects,
    programmers achieve
  • higher order functionality
  • more complex behavior

8
Message composition
  • Three components of a message
  • The object to whom the message is addressed
  • The name of the method to perform
  • Any parameters needed by the method

9
Inheritance
  • A class inherits state and behavior from its
    superclass.
  • Subclasses provide specialized behaviors from the
    basis of common elements provided by the
    superclass.
  • Code reuse
Write a Comment
User Comments (0)
About PowerShow.com