This is a set of exercises to test object-oriented design notions. The included exercises where extracted from Head First Design Patterns Book and they are based on the usage of different design patterns to make them with a flexible design and easy to maintain in case of future requirement changes.
For each exercise there is a main program or a test suite or both, that can be used to test the implementation.
Note: Each of these exersises includes an UML diagram to simplify the visualization of the code on the
diagram
folder inside each project.
- DuckSimulator (Adapter)
- ImmutableTuple (Adapter)
- AdventureGame
- BowlingGame
- CaesarCracker
- DuckSimulator (Strategy)
- HomeTheater
- FizzBuzz
- PizzaStore
- PrimeNumber (Strategy)
- RemoteControl
- Starbuzz
- StringCalculator
- Barista (Template)
- ImmutableList (Template)
- PrimeNumber (Template)
- TextEditor
- WeatherStation
To run the tests, you can use the following command:
./gradlew test