Skip to content

Commit b71e095

Browse files
authored
Merge pull request rage#166 from Rgada28/patch-3
Fix typos in Part 6-1
2 parents 5f0d027 + ab41c1b commit b71e095

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

data/part-6/1-objects-within-objects.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,13 +1656,13 @@ System.out.println(pisin.getNimi());
16561656

16571657
```java
16581658
Person matti = new Person("Matti");
1659-
matti.setPituus(180);
1659+
matti.setHeight(180);
16601660

16611661
Person juhana = new Person("Juhana");
1662-
juhana.setPituus(132);
1662+
juhana.setHeight(132);
16631663

16641664
Person awak = new Person("Awak");
1665-
awak.setPituus(194);
1665+
awak.setHeight(194);
16661666

16671667
AmusementParkRide hurjakuru = new AmusementParkRide("Hurjakuru", 140);
16681668

@@ -1674,9 +1674,9 @@ System.out.println(hurjakuru);
16741674
System.out.println(hurjakuru.averageHeightOfPeopleOnRide());
16751675

16761676
System.out.println();
1677-
System.out.println(hurjakuru.haeTallest().getName());
1677+
System.out.println(hurjakuru.getTallest().getName());
16781678
Person tallest = hurjakuru.getTallest();
1679-
System.out.println(pisin.getName());
1679+
System.out.println(tallest.getName());
16801680
```
16811681

16821682

@@ -1798,7 +1798,7 @@ System.out.println("Empty room? " + room.isEmpty());
17981798

17991799
System.out.println("");
18001800
for (Person person : room.getPersons()) {
1801-
System.out.println(Person);
1801+
System.out.println(person);
18021802
}
18031803
```
18041804

@@ -2293,7 +2293,7 @@ Seuraavassa on luokan käyttöesimerkki: -->
22932293

22942294
Add the following methods to the `Suitcase` class:
22952295

2296-
- a `printGoods` method, which prints all the items in the suitcase
2296+
- a `printItems` method, which prints all the items in the suitcase
22972297

22982298
- a `totalWeight` method, which returns the total weight of the items
22992299

0 commit comments

Comments
 (0)