|
|
|
|
156
|
-
|
156
|
-
|
157
|
### Part 10.1 - Modify `People` class
|
157
|
### Part 10.1 - Modify `People` class
|
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`.
|
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`.
|
|
|
159
|
+* Modify the class signature to declare this class _abstract_.
|
|
|
160
|
+ * An [abstract class](http://www.javacoffeebreak.com/faq/faq0084.html) cannot be instantiated; Its concrete implementation is deferred to its subclass.
|
159
|
* Modify `people` field to enforce that is a container of objects of type `E`.
|
161
|
* Modify `people` field to enforce that is a container of objects of type `E`.
|
160
|
* Modify the `add` method to ensure that it handles object of type `E`.
|
162
|
* Modify the `add` method to ensure that it handles object of type `E`.
|
161
|
-* Modify the `getArray` method to ensure that it returns an object of type `E[]`.
|
|
|
162
|
* Modify the `findById` method to ensure that it returns an object of type `E`.
|
163
|
* Modify the `findById` method to ensure that it returns an object of type `E`.
|
|
|
164
|
+* Modify the `getArray` method signature by declaring it `abstract` of return tyoe `E`.
|
|
|
165
|
+ * An abstract method is a subclass's contractual agreement to the deferment of an implementation of a respective method.
|
163
|
|
166
|
|
164
|
-
|
167
|
-
|
165
|
### Part 10.2 - Modify `People` subclasses
|
168
|
### Part 10.2 - Modify `People` subclasses
|
166
|
* Modify the `Students` class signature to ensure that it is a subclass of `People` of parameterized type `Student`.
|
169
|
* Modify the `Students` class signature to ensure that it is a subclass of `People` of parameterized type `Student`.
|
167
|
* Modify the `Instructors` class signature to ensure that it is a subclass of `People` of parameterized type `Instructor`.
|
170
|
* Modify the `Instructors` class signature to ensure that it is a subclass of `People` of parameterized type `Instructor`.
|
|
|
171
|
+* Provide concrete implementations of the `getArray` method in each of these classes.
|
168
|
|
172
|
|
169
|
-
|
173
|
-
|
170
|
### Part 10.3 - Refactor `ZipCodeWilmington` class
|
174
|
### Part 10.3 - Refactor `ZipCodeWilmington` class
|
|
|
|
|
202
|
* Annotate the constructor with `@Deprecated`.
|
206
|
* Annotate the constructor with `@Deprecated`.
|
203
|
* This constructor should be commented with `//TODO - Remove dependencies`
|
207
|
* This constructor should be commented with `//TODO - Remove dependencies`
|
204
|
* Create a constructor in the `Instructor` class which uses `Educator educator` parameter to set a final `educator` field.
|
208
|
* Create a constructor in the `Instructor` class which uses `Educator educator` parameter to set a final `educator` field.
|
205
|
-* The class should differ calls to the `teach` and `lecture` method to the composite `educator` field.
|
|
|
|
|
209
|
+* The class should defer calls to the `teach` and `lecture` method to the composite `educator` field.
|
206
|
* Remove any calls being made to the deprecated construcor.
|
210
|
* Remove any calls being made to the deprecated construcor.
|
207
|
* Remove the deprecated constructor from the class.
|
211
|
* Remove the deprecated constructor from the class.
|
208
|
|
212
|
|