|
91 | 91 | -
|
92 | 92 | ### Part 6.1 - Create `People` class
|
93 | 93 | * Create a `People` class.
|
94 |
| - * The class should instantiate an `ArrayList` field of `Person` objects named `personList`. |
| 94 | + * The class should instantiate a `List` field of `Person` objects named `personList`. |
95 | 95 | * The class should define a method named `add` which adds a `Person` to the `personList`.
|
96 | 96 | * The class should define a method named `findById` which makes use of a `long id` parameter to return a `Person` object with the respective `id` field.
|
| 97 | + * The class should define a named `contains` which makes use of a `Person person` parameter to return `true` if the `personList` contains the respective `Person` object. |
97 | 98 | * The class should define a method named `remove` which makes use of a `Person person` parameter to remove a respective `Person` object.
|
98 | 99 | * The class should define a method named `remove` which makes use of a `long id` parameter to remove a `Person` object with the respective `id` field.
|
99 |
| - * The class should define a method named `getCount` which returns the size of `personList`. |
100 |
| - * The class should define a method named `getArray` which returns an array representation of the `personList` field. |
101 | 100 | * The class should define a named `removeAll` which clears our `personList` field.
|
| 101 | + * The class should define a method named `count` which returns the size of `personList`. |
| 102 | + * The class should define a method named `toArray` which returns an array representation of the `personList` field. |
| 103 | + * The class should implement `Iterable<E>` and define a method named `iterator` which makes use of the `personList` field to generate a new a `Iterator<E>`. |
102 | 104 |
|
103 | 105 | -
|
104 | 106 | ### Part 6.0 - Test `People`
|
|
141 | 143 | * The class should declare a field that references the instance of `Instructors` called `instructors`.
|
142 | 144 | * The class should define a method `hostLecture` which makes use of a `Teacher teacher, double numberOfHours` parameter to host a `lecture` to the composite `personList` field in the `students` reference.
|
143 | 145 | * The class should define a method `hostLecture` which makes use of a `long id, double numberOfHours` parameter to identify a respective `Instructor` to host a `lecture` to the composite `personList` field in the `cohort` reference.
|
| 146 | + * The class should define a method `getStudyMap` which returns a <u>new instance</u> of a _mapping_ from `Student` objects to `Double` objects, representative of each respective student's `totalStudyTime`. |
144 | 147 |
|
145 | 148 | -
|
146 | 149 | ### Part 9.0 - Test `ZipCodeWilmington`
|
|
0 commit comments