Changes between Version 14 and Version 15 of ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises


Ignore:
Timestamp:
Nov 15, 2016, 8:04:49 PM (9 years ago)
Author:
azhang
Comment:

5

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises

    v14 v15  
    7878From here on out, run whatever code you need in `Farm` to check to make sure your code works the way it is expected to.
    7979
    80 == Animal Farm set 4: Enums
     80== Animal Farm step 4: Enums
    8181* Create an `enum` called `State`, which can be `TAMED`, `PARTIALLY_TAMED`, or `WILD`
    8282* `Cat` and `Dog` all have a `State`. Hummingbirds do not
     
    8585* It is possible to `setState` of `Cat`
    8686* `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