Parcourir la source

Update 'README.md'

nhu313 il y a 6 ans
Parent
révision
b72baab50a
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3
    1
      README.md

+ 3
- 1
README.md Voir le fichier

@@ -135,12 +135,14 @@
135 135
 * Modify the `getArray` method signature by declaring it `abstract` of return type `E`.
136 136
 	* An abstract method is a subclass's contractual agreement to the deferment of an implementation of a respective method.
137 137
 * You may need to create an [inner class](https://docs.oracle.com/javase/tutorial/java/javaOO/innerclasses.html) to test make the People class
138
+
138 139
 -
139 140
 ### Part 10.2 - Modify `People` subclasses
140 141
 * Modify the `Students` class signature to ensure that it is a subclass of `People` of parameterized type `Student`.
141 142
 * Modify the `Instructors` class signature to ensure that it is a subclass of `People` of parameterized type `Instructor`.
142 143
 * See if you can modify the `getArray` method in the `People` class to return the generic array back. Otherwise, add concrete implementations of the `getArray` method in each of these classes
143
-  * HINT: To create a new generic array, you can use `E[] array = (E[]) Array.newInstance(Student[].class.getComponentType(), list.size());`. Note in this code, when I call newInstance, I give the Student[].class. Change it so it can be Student[] or Instructor[] or Person[].
144
+    * HINT: To create a new generic array, you can use `E[] array = (E[]) Array.newInstance(Student[].class.getComponentType(), list.size());`. Note in this code, when I call newInstance, I give the Student[].class. Change it so it can be Student[] or Instructor[] or Person[].
145
+
144 146
 -
145 147
 ### Part 10.3 - Refactor `ZipCodeWilmington` class
146 148
 * Refactor the `hostLecture` method in the `ZipCodeWilmington` class by removing any intermediate _casting trick(s)_.