GofPatterns GofPatterns


Designing Software  «Prev  Next»
Lesson 7Course project, part 7
Objective Finish your traffic flow system.

Traffic Flow System Course Project

You are almost done with the course project. At this point, all the fundamental pieces are in place. All that remains is to attach a simple user interface for driving the simulation and watching it run.
This simple user interface is not an elegant one, but it will work well enough to test the system. It would not be hard to pull this interface out and replace it with a better graphical interface.

TrafficFlow System - Exercise

Now it is time to finish the system you have been developing.
TrafficFlow System - Exercise

Observer Pattern reviewed

The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems. Observer is also a key part in the familiar MVC architectural pattern. The observer pattern was first implemented in Smalltalk's MVC based user interface framework.

Observer Pattern consisting of 1) Observer class 2) Subject and 3) ConcreteObserverA and B