Changes between Version 14 and Version 15 of ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises
- Timestamp:
- Nov 15, 2016, 8:04:49 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises
v14 v15 78 78 From here on out, run whatever code you need in `Farm` to check to make sure your code works the way it is expected to. 79 79 80 == Animal Farm s et4: Enums80 == Animal Farm step 4: Enums 81 81 * Create an `enum` called `State`, which can be `TAMED`, `PARTIALLY_TAMED`, or `WILD` 82 82 * `Cat` and `Dog` all have a `State`. Hummingbirds do not … … 85 85 * It is possible to `setState` of `Cat` 86 86 * `Dog` can be `tame`, which makes them more tamed (`WILD` -> `PARTIALLY_TAMED`, `PARTIALLY_TAMED` -> `TAMED`, `TAMED` -> `TAMED`) 87 88 == Animal Farm step 5: Static 89 * `Animal` has a `static int` called `population`, which starts at `0` and increases by `1` every time an animal is created 90 * `Animal` has a `static getPopulation` method which returns the total number of animals created