A class diagram models the classes in a system and the relationships among those classes. It’s probably the most frequently encountered UML diagram.

Create a class diagram with appropriate associations, generalization, and composition for a simulation of a city’s street traffic system. Include at least the following classes:

  • City
  • Street
  • Vehicle
  • Car
  • Truck
  • Motorcycle
  • Pedestrian
  • TrafficLight
  • StopSign