GofPatterns
SiteMap
Design Patterns Course
Behavioral Patterns
Creational Patterns
Structural Patterns
Designing Software
«Prev
Next»
Design Patterns
Defining Patterns
Three Types Design Patterns
Behavioral Creational Structural
Design Pattern Components
Design Pattern Benefits
Design Pattern Scope
Three Categories Patterns
Singleton Patterns
Singleton Pattern-Quiz
Real World Examples
Design Pattern Elements
Creational Patterns
Factory Method Consequences
Factory Method-Exercise
Common Creational Patterns
Structural Patterns
Structural Pattern Example
Patterns Help Programmers
Common Structural Patterns
Flyweight Pattern
Flyweight Consequences
GOF Structural Patterns
Adapter Bridge Composite
Flyweight Suitability
Behavioral Patterns
Define Behavioral Patterns
Mediator Pattern Applicability
Observer Pattern Tradeoffs
Designing Software
How to Choose Pattern
Combine Design Patterns
Design Pattern Limitations
How To Apply Pattern
Observer Class - 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.
Submit