Homework Assignment 1

[ Problem 1 ] [ Problem 2 ]

Due : 6.30pm, October 1, 1998.


Problem 1

If you a Mechanical Engineer, solve Problem 2.2 in the notoes. Otherwise, solve solve Problem 2.1.


Problem 2

Suppose that we are interested in creating an object-oriented model of cars passing through an intersection that is controled by traffic lights.

[Mesh 1]

Figure 1 : Layout of road lanes and traffic lights

Assume that arrangement of traffic lights and road lanes is as shown in Figure 1, and that the lights switch from red to green to amber in a regular repetitive pattern. Moreover, assume that driver behavior is constrained by the road rules (keep this part really simple) and the desire to avoid vehicle collisions. State all assumptions that you make about the vehicle.

Things to do

  1. Develop one or more class hierarchies for this problem, and indicate how they will communicate.

    My suggestion is that you create one class hierarchy for the intersection and traffic lights, and a second hierarchy for the vehicle(s) and driver(s).

  2. Develop one or more functional flow block diagrams (FFBDs) for the behavior of cars arriving at the intersection.

  3. What is the connection between your class hierarchy(s) and FFBDs?

  4. Demonstrate by example how your class hierarchy can be modified and reused for a slightly different scenario.

What to hand in

This assignment is tricky, and I'm sure there will me more than one good solution. My suggestion is think about the problem and write a summary of your key ideas (let's say no more than 10 pages).

You can hand in a paper solution or develop a web page, and hand in a screendump of the web page. The latter will help you later in the semester.


Developed in September 1998 by Mark Austin
Last Modified September 21, 1996
Copyright © 1998, Mark Austin, Department of Civil Engineering, University of Maryland