+ All Categories
Home > Documents > ch 1 Object-Oriented Programming.ppt

ch 1 Object-Oriented Programming.ppt

Date post: 06-Jul-2018
Category:
Upload: sreenu-kaki
View: 222 times
Download: 0 times
Share this document with a friend

of 25

Transcript
  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    1/25

     An Introduction to Programming Using

    Object-Oriented

    Programming

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    2/25

     An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An algorithm is a step-by-step process.

     A computer program is a step-by-step set of

    instructions for a computer.

    Every computer program is an algorithm.

     Algorithms have a long history in science,

    technology, engineering and math.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    3/25

     An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    Early computers ere

    far less comple! than

    computers are today.

    "heir memories ere

    smaller and their programs

    ere much simpler.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    4/25

     An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    "hey usually e!ecuted onlyone program at a time.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    5/25

     An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    #odern computers are

    smaller, but far more

    comple! than earlycomputers.

    "he can e!ecute many

    programs at the same time.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    6/25

     An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    $omputer scientists have

    introduced the notion of

    objects and object- oriented programming  to

    help manage the groing

    comple!ity of modern

    computers. 

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    7/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    8/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

    &umbers

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    9/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

    "e!t

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    10/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

    Pictures

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    11/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

    'ound

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    12/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object  is anything that can be represented by

    data in a computer%s memory and manipulated by

    a computer program.

    (ideo

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    13/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     An object is anything that can be represented by data.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    14/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    An object can be something

    in the physical orld or

    even just an abstract idea.

    An airplane, for  e!ample, is

    a physical object that can

    be manipulated by a

    computer. 

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    15/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    An object can be something

    in the physical orld or

    even just an abstract idea.

    A ban) transaction is an

    e!ample of an object that

    is not physical. 

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    16/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    "o a computer, an object is

    simply something that can

    be represented by data in

    the computer%s memory and

    manipulated by computer

    programs.

     

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    17/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    "he data that represent the

    object are organi*ed into a

    set of properties.

    "he values stored in an

    object%s properties at any

    one time form the state of an object.

    NameName++ PA /PA /

    Owner Owner ++ U' AirlinesU' Airlines

    LocationLocation++ 012 345 & 0 62 015 7 012 345 & 0 62 015 7

    Heading Heading ++ 161688

     Altitude Altitude++ 6 m6 m

     AirSpeed  AirS peed ++ 33

    MakeMake++ 9oeing9oeingModel Model ++

    Weight Weight ++ 1,:13 )g1,:13 )g

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    18/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    $omputer programs

    implement algorithms that

    manipulate the data.

    In object-oriented

    programming, the programs

    that manipulate theproperties of an object are

    the object%s methods.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    19/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    7e can thin) of an object

    as a collection of properties

    and the methods that are

    used to manipulate those

    properties.

    Properties

    #ethods

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    20/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     A class is a group of

    objects ith the same

    properties and the same

    methods.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    21/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    Each copy of an object

    from a particular class iscalled an instance of

    the object.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    22/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    "he act of creating a

    ne instance of anobject is called

    instantiation. 

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    23/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

     A class can be thought

    of as a blueprint forinstances of an object.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    24/25 An Introduction to Programming Using

    Object-Oriented ProgrammingObject-Oriented Programming

    "o different instances of

    the same class ill havethe same properties, but

    different values stored in

    those properties.

  • 8/17/2019 ch 1 Object-Oriented Programming.ppt

    25/25

    Object-Oriented ProgrammingObject-Oriented Programming

    "he same terminology

    is used in most object-

    oriented programming

    languages.

    Object

    Instance

    Property

    MethodInstantiation

    Class

    State


Recommended