Changes between Version 7 and Version 8 of ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises


Ignore:
Timestamp:
Nov 14, 2016, 8:13:44 PM (9 years ago)
Author:
azhang
Comment:

--

Legend:

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

    v7 v8  
    3333In the `main` method, the `Farm` will:
    3434* print the names of both animals and their masses.
    35   1. Ex. `Spot is a Dog with a mass of 15.4.`
     35  * Ex. `Spot is a Dog with a mass of 15.4.`
    3636* Then, `Cloud` will `eat` `0.2`, `move` `0.8`, and `speak`.
    3737* `Spot` will then `eat` `0.4`,  `move` `0.6`, and `speak`.
     
    4747* All `Animal` can `printInformation`, which prints information on the specific animal.
    4848  * Ex. `Spot is a Dog with a mass of 15.4`
     49
     50Create a class called `Hummingbird`
     51* All `Hummingbird` have a `wingspan`.
     52* Hummingbirds must be created with a `mass`, `wingspan`, and `name`.
     53* When a Hummingbird `speak`, it prints `Tweet!`
     54* Everybody can use `getWingspan` to get the `wingspan` of a Hummingbird.
     55
     56`Farm` should:
     57* Create an array of 5 `Animal` that contains:
     58  * 1 `Dog` with `mass` `10`
     59  * 1 `Dog` with `mass` `15` and `name` `Fido`
     60  * 1 `Cat` with `mass` `13` and `name` `Cloud`
     61  * 1 `Hummingbird` with `mass` `1.1`, `name` `Birdie`, and `wingspan` `2.2`
     62  * 1 `Dog` with `mass` `5`
     63* `printInformation` on all `Animal` in the array