Changes between Version 23 and Version 24 of ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises


Ignore:
Timestamp:
Dec 2, 2016, 9:41:13 PM (9 years ago)
Author:
azhang
Comment:

Taming Dogs is clearer now. (and other unimportant stuff)

Legend:

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

    v23 v24  
    9696* `Cat` and `Dog` start with a default `State` of `WILD`
    9797* It is possible to `setState` of `Cat`
    98 * `Dog` can be `tame`, which makes them more tamed (`WILD` -> `PARTIALLY_TAMED`, `PARTIALLY_TAMED` -> `TAMED`, `TAMED` -> `TAMED`)
     98* You can `tame` a `Dog`, which makes them more tamed (`WILD` -> `PARTIALLY_TAMED`, `PARTIALLY_TAMED` -> `TAMED`, `TAMED` -> `TAMED`)
    9999
    100 === Step 5: Static
     100=== Step 5: Static Variables and Methods
    101101* `Animal` has a `static int` called `population`, which starts at `0` and increases by `1` every time an animal is created
    102102* `Animal` has a `static getPopulation` method which returns the total number of animals created
     
    106106* Create an `interface` called `Building`
    107107* A building must be able to `collapse`
    108 * A building must be able to `store` an object
     108* A building must be able to `store` an `Object`, which `return` `true` if it was successful and `false` otherwise.
    109109
    110110=== Step 7: Lists, Generics
     
    113113  * Research `Java Generics` to find out how to create a `List` of `Animal`, and to find out what generics do
    114114  * Use either an `ArrayList` or `LinkedList`, but keep the type generalized as `List`
     115  * When a `Farm` `store` an `Object`, it `add` the object to the end of the `List Animal` and `return true` if the object is an `Animal`. Otherwise, it does nothing and `return false`.
    115116* A `Farm` has an `address`
    116117* A `Farm` has a `Color` that can be `RED`, `BROWN`, `WHITE`, `BLUE`, or `GREEN`