Design Patterns «Prev Next»

Primary Objects and Classes - Course Project Exercise

Begin your Course Project

Objective: Propose the primary objects and classes for the traffic-flow simulation and assign an initial responsibility to each one.

Use the project rules from the previous lesson. Consider physical entities such as vehicles, pedestrians, signals, roads, and intersections, but do not assume that every noun must become a class. Also consider nonphysical responsibilities such as time, coordination, traffic generation, and measurement.

For each candidate, provide:

  1. the class or interface name;
  2. one sentence describing its primary responsibility;
  3. the objects with which it must collaborate; and
  4. one design question that remains unresolved.

Try to keep the model general enough to support another intersection configuration without rewriting every class. Do not assign GoF patterns yet. This answer is the baseline against which later pattern-based designs will be compared.

Type or paste your response below, then select Submit to compare it with the reference analysis.