Designing Software  «Prev  Next»

Observer Class | Design Pattern - Exercise

Flexibility

Objective:Make the VehicleQueue an Observer of the Time class.
Make the VehicleQueue an Observer of the Time class. Every five seconds the vehicle queue should attempt to dequeue a vehicle but if and only if the light is green. Consider whether you need to make any changes to the standard Observer pattern to make thiswork. In the text area below, type in or paste your answer and click the Submit button.