In the Fall quarter of 2013 at DePaul University, I wrote the Car Traffic Simulation Application as the final project for the class SE450 – Object-Oriented Software Development. The purpose of this project was to apply the studied object-oriented design principles and patterns throughout the quarter. The professor provided the class with start-up code from which each student can build his solution. I chose to discard that code completely and design and build my own solution from scratch. The reason why I did this was because I believe while still being a student, every opportunity possible to learn something and write as much code as possible must be taken.
I started by designing and implementing a framework on top of Java with which I can build any simulation application. Then I used that framework to build the car simulation. I also wrote an extensive design document with UML diagrams, fully documented all the code in a Java-doc style documentation, and extensively wrote unit tests for the framework that I built.
Nine design patterns were used in the implementation of the application. They helped making the code very organized, minimal, and data driven. Those design patterns were:
- The command design pattern.
- The singleton design pattern.
- The strategy design pattern.
- The state design pattern.
- The static factory design pattern.
- The template method design pattern.
- The null object design pattern.
- The visitor design pattern.
- The observer design pattern.
The below video demonstrates the application.