An approach to

Object-Oriented Design
  • work at the abstract level as long as possible
  • avoid rushing to implementation considerations too quickly
  • three primary steps:
    1. identify and describe the objects
      • the building blocks of the system
      • leads to classes that will be used
    2. define the interface to each class
      • leads to the operations on each object
    3. describe the design framework
      • how will the object interact?
      • leads to the process control description
  • Identifying the objects and classes

  • read the problem and underline all nouns
  • create a list of candidate objects based on the underlined nouns
  • consider the relationships among objects
  • e.g.: Joe has-a leg but not (Joe is-a leg)

    Defining the interface

    Questions to consider for each operation

    Describing the process control

  • leads to the design framework:
  • main control module corresponds to the main function in the C++ program
  • partition system into independent modules or subprograms
  • The structure tree

  • a top-down hierarchy for organizing the program, its subprograms, and the classes
  • developed using top-down design

  • If you have questions, please send mail to:
    owens@docs.uu.se
    Revised Thursday 19 September 16:50