Changes between Version 7 and Version 8 of ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises
- Timestamp:
- Nov 14, 2016, 8:13:44 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/JavaExercises
v7 v8 33 33 In the `main` method, the `Farm` will: 34 34 * 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.` 36 36 * Then, `Cloud` will `eat` `0.2`, `move` `0.8`, and `speak`. 37 37 * `Spot` will then `eat` `0.4`, `move` `0.6`, and `speak`. … … 47 47 * All `Animal` can `printInformation`, which prints information on the specific animal. 48 48 * Ex. `Spot is a Dog with a mass of 15.4` 49 50 Create 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