Object-Oriented Design Process

Contents

From Problem to Code

Three Phases:

Analysis Phase

Functional Specification

Describe what needs to be done, not how it should be done.

Develop a set of use cases. A use case is a description of a sequence of actions that yields a benefit for the user of a system.

Design Phase

Goals
Documents

Implementation Phase

Object and Class Concepts

Identifying Classes

Rule of thumb: Look for nouns in problem description

Identifying Classes

Focus on concepts, not implementation

Categories of Classes

Identifying Responsibilities

Rule of thumb: Look for verbs in problem description

Behavior of MessageQueue:

Responsibilities

Class Relationships

Dependency Relationship

Coupling

Aggregation

Multiplicities

Inheritance

Use Cases

Sample Use Case

Leave a Message

  1. Caller dials main number of voice mail system
  2. System speaks prompt
    Enter mailbox number followed by #
  3. User types extension number
  4. System speaks
    You have reached mailbox xxxx. Please leave a message now
  5. Caller speaks message
  6. Caller hangs up
  7. System places message in mailbox

Sample Use Case -- Variations

Variation #1

1.1. In step 3, user enters invalid extension number
1.2. Voice mail system speaks
     You have typed an invalid mailbox number.
1.3. Continue with step 2.

Variation #2

2.1. After step 4, caller hangs up instead of speaking message
2.3. Voice mail system discards empty message

CRC Cards

CRC Cards


CRC Cards

Walkthroughs

Walkthroughs

.


UML Diagrams

Class Diagrams

Class Diagrams

.

Class Relationships

.

Multiplicities

.

Composition

.

Association

.

Association

.

Interface Types

.

Tips

Sequence Diagrams

,


Self call


.

Object Construction

.

State Diagram

.

Design Documentation

Reference

Cay S. Horstmann, Object-Oriented Design & Patterns, Second Edition, John Wiley, 2006. ISBN 0-471-74487-5. Chapter 2


Maintained by John Loomis, last updated 25 February 2007