-
Notifications
You must be signed in to change notification settings - Fork 5
Chapter 1 Demo
David Zemon edited this page Feb 5, 2017
·
1 revision
This chapter contains a demonstration of the mess produced by dependency injection. We start with a basic "Hello World!" program and build a small application without Spring.
The demo will walk you through development of a simple program which which will create and spawn Pokemon on a map.
- We will create the following POJOs
-
Pokemonwill contain information about Pokemon (ID, HP, attack) -
PokemonLocationwill contain whereabouts for each Pokemon (x and y coordinates, Pokemon ID)
-
- We will implement the following classes
-
RandomNumberGeneratorwill return a random integer value -
PokemonFactorywill use theRandomNumberGeneratorto generate HP and attack values -
PokemonDaowill be used to store and retrieve Pokemon -
PokemonLocationDaowill be used to store and retrieve Pokemon location information -
Gameboardwill use thePokemonFactoryand DAOs to spawn Pokemon at various locations
-