|
@@ -126,6 +126,7 @@
|
126
|
126
|
* Create a `TestInstructors` class.
|
127
|
127
|
|
128
|
128
|
|
|
129
|
+-
|
129
|
130
|
### Part 9.1 - Create `ZipCodeWilmington` Class
|
130
|
131
|
* Use `Part 7` as a reference.
|
131
|
132
|
* Create a `ZipCodeWilmington` singleton.
|
|
@@ -152,6 +153,7 @@
|
152
|
153
|
* You may have noticed that the `findById`, and `hostLecture` methods require an intermediate [casting trick](https://stackoverflow.com/questions/5289393/casting-variables-in-java).
|
153
|
154
|
* To remedy this issue, we can _generify_ the `People` class.
|
154
|
155
|
|
|
156
|
+-
|
155
|
157
|
### Part 10.1 - Modify `People` class
|
156
|
158
|
* [Parameterize](https://stackoverflow.com/questions/12551674/what-is-meant-by-parameterized-type) the `People` signature to enforce that it is a container for objects of type `E` such that `E` is a subclass of `Person`.
|
157
|
159
|
* Modify `people` field to enforce that is a container of objects of type `E`.
|
|
@@ -159,13 +161,16 @@
|
159
|
161
|
* Modify the `getArray` method to ensure that it returns an object of type `E[]`.
|
160
|
162
|
* Modify the `findById` method to ensure that it returns an object of type `E`.
|
161
|
163
|
|
|
164
|
+-
|
162
|
165
|
### Part 10.2 - Modify `People` subclasses
|
163
|
166
|
* Modify the `Students` class signature to ensure that it is a subclass of `People` of parameterized type `Student`.
|
164
|
167
|
* Modify the `Instructors` class signature to ensure that it is a subclass of `People` of parameterized type `Instructor`.
|
165
|
168
|
|
|
169
|
+-
|
166
|
170
|
### Part 10.3 - Refactor `ZipCodeWilmington` class
|
167
|
171
|
* Refactor the `hostLecture` method in the `ZipCodeWilmington` class by removing any intermediate _casting trick(s)_.
|
168
|
172
|
|
|
173
|
+-
|
169
|
174
|
### Part 10.0 - Test refactored classes.
|
170
|
175
|
* Ensure that the `TestStudents`, `TestInstructors`, `TestPeople`, `TestZipCodeWilmington` classes were no affected by the refactor.
|
171
|
176
|
|
|
@@ -180,15 +185,19 @@
|
180
|
185
|
Additionally, it's challenging to ensure **every** `Person` instance has a unique ID amongst its respective `People` subclass.<br>
|
181
|
186
|
To remedy this issue, we redesign and refactor.
|
182
|
187
|
|
|
188
|
+-
|
183
|
189
|
### Part 11.1 - Create `Educator` enum
|
184
|
190
|
* Create an enum named `Educator`.
|
185
|
191
|
* The enum should implement `Teacher`.
|
186
|
192
|
* The enum should have an enumeration for each of the instructors represented in the `Instructors` class.
|
187
|
193
|
* The enum should have an _empty nullary constructor_.
|
188
|
|
-
|
|
194
|
+
|
|
195
|
+-
|
189
|
196
|
### Part 11.0 - Test `Educator`
|
190
|
197
|
* Use `Part 5` as a reference.
|
191
|
198
|
|
|
199
|
+
|
|
200
|
+-
|
192
|
201
|
### Part 12.1 - Modify `Instructor` Class
|
193
|
202
|
* Annotate the constructor with `@Deprecated`.
|
194
|
203
|
* This constructor should be commented with `//TODO - Remove dependencies`
|
|
@@ -197,6 +206,8 @@ To remedy this issue, we redesign and refactor.
|
197
|
206
|
* Remove any calls being made to the deprecated construcor.
|
198
|
207
|
* Remove the deprecated constructor from the class.
|
199
|
208
|
|
|
209
|
+
|
|
210
|
+-
|
200
|
211
|
### Part 12.0 - Test `Instructor`
|
201
|
212
|
* Refactor `TestInstructor` to support the newly created `Instructor` constructor.
|
202
|
213
|
* Ensure the tests were not affected by the refactoring.
|