cs2340: Objects and Design: Some OO History and Object Theory - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

cs2340: Objects and Design: Some OO History and Object Theory

Description:

Sending Flowers (Procedural) What do I need to do? What data ... Goal: Send Flowers to Robin. Arranger. Grower. Wholesaler. DeliveryPerson. Adapted from Budd ... – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 18
Provided by: Robert9
Category:

less

Transcript and Presenter's Notes

Title: cs2340: Objects and Design: Some OO History and Object Theory


1
cs2340 Objects and Design Some OO History and
Object Theory
  • Spring 2007

2
Object Theory
  • Read Budd book chapters on-line
  • Just using an Object-Oriented language does not
    mean you truly think in objects!
  • Side Note Languages are tools, one is not
    better than another in a general sense.

3
Sending Flowers (Procedural)
What do I need to do? What data do I need?
Chris
Robin
4
Sending Flowers (OO)
Arranger
Goal Send Flowers to Robin
Goal Turn Raw Flowers into an arrangement
Florist
Chris
Goal Create Flowers
Grower
Goal Satisfy Customer
Wholesaler
Goal Provide Fresh Flowers
Robin
DeliveryPerson
Goal Deliver Flowers to Robin
Adapted from Budd
5
What characteristics do we see?
6
Object-Oriented Mantra
  • Objects do the work. The work is done in instance
    methods in the appropriate class. Good objects
    have clear, cohesive responsibilities and clear
    focused interfaces.
  • Budd OOP is structured as a community of
    interacting agents called objects. Each object
    has a role to play. Each object provides a
    service or performs an action used by other
    members of the community.

7
So What is an Object?
8
An Organizational Hierarchy
  • An application a set of interacting objects
  • An object an implementation of one or more
    roles
  • A role a set of related responsibilities
  • A responsibility an obligation to perform a
    task or know information
  • A collaboration an interaction of objects or
    roles (or both)
  • A contract an agreement outlining the terms of
    a collaboration

9
Sending Flowers (OO)
Arranger
Goal Send Flowers to Robin
Goal Turn Raw Flowers into an arrangement
Florist
Chris
Goal Create Flowers
Grower
Goal Satisfy Customer
Wholesaler
Goal Provide Fresh Flowers
Robin
DeliveryPerson
Goal Deliver Flowers to Robin
Adapted from Budd
10
Contrasting Object vs. Procedural Thinking
  • Design the software for the Mars Rover.

Verb-Oriented vs. Noun-Oriented
11
Start of the Story Late 60's and Early 70's
  • Windows are made of glass, mice are undesirable
    rodents
  • Good programming Structured programming
  • Verb-oriented
  • Punch-cards, teletype terminals

12
Howd we get from there to here?
  • How did we move from structured to
    object-oriented?
  • Key ideas
  • Master-drawings in Sketchpad
  • Simulation objects in Simula
  • Alan Kay and a desire to make software better
  • More robust, more maintainable, more scalable

13
Birth of Objects, 1 of 2
  • Ivan Sutherland's Sketchpad, 1963

14
Birth of Objects, 2 of 2
  • Simula
  • Simulation programming language from Norway, 1966
    (Kristen Nygaard Ole-Johan Dahl)
  • Define an activity which can be instantiated as
    processes
  • Each process has it own data and behavior
  • In real world, objects don't mess with each
    others' internals directly
  • (Simulated) Multi-processing
  • No Universal Scheduler in the Real World

15
Alan Kay
  • U. Utah PhD student in 1966
  • Read Sketchpad, Ported Simula
  • Saw objects as the future of computer science
  • His dissertation Flex, an object-oriented
    personal computer
  • A personal computer was a radical idea then
  • How radical?

"There is no reason anyone would want a computer
in their home." (Ken Olsen, Digital Equipment
Corp, 1977)
16
OO History
  • Sketchpad Ivan Sutherland (1963)
  • Simula Kristen Nygaard (1967)
  • Alan Kay Dynabook (1968)

17
OOP Term Review
  • Class/Object
  • Instance
  • Message
  • Receiver
  • Class Hierarchy
  • Inheritance
  • Overriding/Overloading
  • Polymorphism
  • Encapsulation
  • Abstraction
  • Information Hiding
Write a Comment
User Comments (0)
About PowerShow.com