Due : 6.30pm, October 1, 1998.
If you a Mechanical Engineer, solve Problem 2.2 in the notoes. Otherwise, solve solve Problem 2.1.
Suppose that we are interested in creating an object-oriented model
of cars passing through an intersection that is controled by 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
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).
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.