Browse Source

part 10 complete

Lauren Green 6 years ago
parent
commit
3e8c390b54

+ 134
- 192
.idea/workspace.xml View File

@@ -2,9 +2,13 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="3954aa81-5cd3-4793-bed6-30801837f5cd" name="Default Changelist" comment="">
5
-      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java" afterDir="false" />
7 5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java" afterDir="false" />
8 12
     </list>
9 13
     <ignored path="$PROJECT_DIR$/target/" />
10 14
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -13,6 +17,11 @@
13 17
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14 18
     <option name="LAST_RESOLUTION" value="IGNORE" />
15 19
   </component>
20
+  <component name="CoverageDataManager">
21
+    <SUITE FILE_PATH="coverage/interfaces_1$TestPeople.ic" NAME="TestPeople Coverage Results" MODIFIED="1541338793223" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
22
+      <FILTER>io.zipcoder.interfaces.*</FILTER>
23
+    </SUITE>
24
+  </component>
16 25
   <component name="FUSProjectUsageTrigger">
17 26
     <session id="-1127968663">
18 27
       <usages-collector id="statistics.lifecycle.project">
@@ -25,22 +34,22 @@
25 34
       </usages-collector>
26 35
       <usages-collector id="statistics.file.extensions.open">
27 36
         <counts>
28
-          <entry key="java" value="38" />
37
+          <entry key="java" value="50" />
29 38
         </counts>
30 39
       </usages-collector>
31 40
       <usages-collector id="statistics.file.types.open">
32 41
         <counts>
33
-          <entry key="JAVA" value="38" />
42
+          <entry key="JAVA" value="50" />
34 43
         </counts>
35 44
       </usages-collector>
36 45
       <usages-collector id="statistics.file.extensions.edit">
37 46
         <counts>
38
-          <entry key="java" value="3859" />
47
+          <entry key="java" value="4410" />
39 48
         </counts>
40 49
       </usages-collector>
41 50
       <usages-collector id="statistics.file.types.edit">
42 51
         <counts>
43
-          <entry key="JAVA" value="3859" />
52
+          <entry key="JAVA" value="4410" />
44 53
         </counts>
45 54
       </usages-collector>
46 55
     </session>
@@ -48,10 +57,10 @@
48 57
   <component name="FileEditorManager">
49 58
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
50 59
       <file pinned="false" current-in-tab="false">
51
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudents.java">
60
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
52 61
           <provider selected="true" editor-type-id="text-editor">
53
-            <state relative-caret-position="75">
54
-              <caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
62
+            <state relative-caret-position="165">
63
+              <caret line="11" column="8" selection-start-line="11" selection-start-column="8" selection-end-line="13" selection-end-column="55" />
55 64
               <folding>
56 65
                 <element signature="imports" expanded="true" />
57 66
               </folding>
@@ -59,11 +68,11 @@
59 68
           </provider>
60 69
         </entry>
61 70
       </file>
62
-      <file pinned="false" current-in-tab="false">
63
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructors.java">
71
+      <file pinned="false" current-in-tab="true">
72
+        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java">
64 73
           <provider selected="true" editor-type-id="text-editor">
65
-            <state relative-caret-position="390">
66
-              <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
74
+            <state relative-caret-position="1095">
75
+              <caret line="73" column="5" selection-start-line="73" selection-start-column="5" selection-end-line="73" selection-end-column="5" />
67 76
               <folding>
68 77
                 <element signature="imports" expanded="true" />
69 78
               </folding>
@@ -72,53 +81,10 @@
72 81
         </entry>
73 82
       </file>
74 83
       <file pinned="false" current-in-tab="false">
75
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
76
-          <provider selected="true" editor-type-id="text-editor">
77
-            <state relative-caret-position="30">
78
-              <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
79
-            </state>
80
-          </provider>
81
-        </entry>
82
-      </file>
83
-      <file pinned="false" current-in-tab="false">
84
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java">
85
-          <provider selected="true" editor-type-id="text-editor">
86
-            <state relative-caret-position="165">
87
-              <caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
88
-              <folding>
89
-                <element signature="e#392#393#0" expanded="true" />
90
-                <element signature="e#423#424#0" expanded="true" />
91
-              </folding>
92
-            </state>
93
-          </provider>
94
-        </entry>
95
-      </file>
96
-      <file pinned="false" current-in-tab="false">
97
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
84
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java">
98 85
           <provider selected="true" editor-type-id="text-editor">
99
-            <state relative-caret-position="30">
100
-              <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
101
-            </state>
102
-          </provider>
103
-        </entry>
104
-      </file>
105
-      <file pinned="false" current-in-tab="false">
106
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
107
-          <provider selected="true" editor-type-id="text-editor">
108
-            <state relative-caret-position="75">
109
-              <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
110
-            </state>
111
-          </provider>
112
-        </entry>
113
-      </file>
114
-      <file pinned="false" current-in-tab="true">
115
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java">
116
-          <provider selected="true" editor-type-id="text-editor">
117
-            <state relative-caret-position="225">
118
-              <caret line="15" selection-start-line="15" selection-end-line="16" selection-end-column="57" />
119
-              <folding>
120
-                <element signature="imports" expanded="true" />
121
-              </folding>
86
+            <state relative-caret-position="360">
87
+              <caret line="24" column="4" selection-start-line="24" selection-start-column="4" selection-end-line="35" selection-end-column="5" />
122 88
             </state>
123 89
           </provider>
124 90
         </entry>
@@ -126,37 +92,15 @@
126 92
       <file pinned="false" current-in-tab="false">
127 93
         <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
128 94
           <provider selected="true" editor-type-id="text-editor">
129
-            <state relative-caret-position="60">
130
-              <caret line="4" column="7" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
95
+            <state relative-caret-position="555">
96
+              <caret line="45" column="35" selection-start-line="45" selection-start-column="35" selection-end-line="45" selection-end-column="35" />
131 97
               <folding>
132
-                <element signature="e#152#160#0" expanded="true" />
133
-                <element signature="e#173#174#0" expanded="true" />
134
-                <element signature="e#229#230#0" expanded="true" />
135
-                <element signature="e#753#754#0" expanded="true" />
136
-                <element signature="e#793#794#0" expanded="true" />
98
+                <element signature="imports" expanded="true" />
137 99
               </folding>
138 100
             </state>
139 101
           </provider>
140 102
         </entry>
141 103
       </file>
142
-      <file pinned="false" current-in-tab="false">
143
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
144
-          <provider selected="true" editor-type-id="text-editor">
145
-            <state relative-caret-position="135">
146
-              <caret line="9" column="25" selection-start-line="9" selection-start-column="25" selection-end-line="9" selection-end-column="25" />
147
-            </state>
148
-          </provider>
149
-        </entry>
150
-      </file>
151
-      <file pinned="false" current-in-tab="false">
152
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
153
-          <provider selected="true" editor-type-id="text-editor">
154
-            <state relative-caret-position="285">
155
-              <caret line="19" column="35" lean-forward="true" selection-start-line="19" selection-start-column="35" selection-end-line="19" selection-end-column="35" />
156
-            </state>
157
-          </provider>
158
-        </entry>
159
-      </file>
160 104
     </leaf>
161 105
   </component>
162 106
   <component name="FileTemplateManagerImpl">
@@ -181,14 +125,14 @@
181 125
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" />
182 126
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" />
183 127
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" />
184
-        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java" />
185
-        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" />
186
-        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" />
187
-        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" />
188 128
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudents.java" />
189 129
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructors.java" />
190 130
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" />
131
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" />
132
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" />
133
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" />
191 134
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java" />
135
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java" />
192 136
       </list>
193 137
     </option>
194 138
   </component>
@@ -206,7 +150,7 @@
206 150
     </option>
207 151
   </component>
208 152
   <component name="ProjectFrameBounds">
209
-    <option name="x" value="289" />
153
+    <option name="x" value="400" />
210 154
     <option name="y" value="23" />
211 155
     <option name="width" value="1280" />
212 156
     <option name="height" value="958" />
@@ -282,7 +226,7 @@
282 226
   <component name="PropertiesComponent">
283 227
     <property name="WebServerToolWindowFactoryState" value="false" />
284 228
     <property name="aspect.path.notification.shown" value="true" />
285
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541336668387" />
229
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541338954677" />
286 230
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
287 231
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
288 232
   </component>
@@ -298,8 +242,8 @@
298 242
       </list>
299 243
     </option>
300 244
   </component>
301
-  <component name="RunManager" selected="JUnit.TestZipCodeWilmington.testHostLecture">
302
-    <configuration name="TestInstructors" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
245
+  <component name="RunManager" selected="JUnit.TestPeople.testAdd">
246
+    <configuration name="TestPeople" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
303 247
       <module name="interfaces-1" />
304 248
       <extension name="coverage">
305 249
         <pattern>
@@ -308,12 +252,12 @@
308 252
         </pattern>
309 253
       </extension>
310 254
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
311
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructors" />
255
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
312 256
       <method v="2">
313 257
         <option name="Make" enabled="true" />
314 258
       </method>
315 259
     </configuration>
316
-    <configuration name="TestPeople" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
260
+    <configuration name="TestPeople.testAdd" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
317 261
       <module name="interfaces-1" />
318 262
       <extension name="coverage">
319 263
         <pattern>
@@ -323,11 +267,13 @@
323 267
       </extension>
324 268
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
325 269
       <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
270
+      <option name="METHOD_NAME" value="testAdd" />
271
+      <option name="TEST_OBJECT" value="method" />
326 272
       <method v="2">
327 273
         <option name="Make" enabled="true" />
328 274
       </method>
329 275
     </configuration>
330
-    <configuration name="TestStudents.testInitializationSetupStudents" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
276
+    <configuration name="TestPeople.testFindById" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
331 277
       <module name="interfaces-1" />
332 278
       <extension name="coverage">
333 279
         <pattern>
@@ -336,14 +282,14 @@
336 282
         </pattern>
337 283
       </extension>
338 284
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
339
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudents" />
340
-      <option name="METHOD_NAME" value="testInitializationSetupStudents" />
285
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
286
+      <option name="METHOD_NAME" value="testFindById" />
341 287
       <option name="TEST_OBJECT" value="method" />
342 288
       <method v="2">
343 289
         <option name="Make" enabled="true" />
344 290
       </method>
345 291
     </configuration>
346
-    <configuration name="TestStudents.testSingletonInstance" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
292
+    <configuration name="TestPeople.testRemoveById" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
347 293
       <module name="interfaces-1" />
348 294
       <extension name="coverage">
349 295
         <pattern>
@@ -352,14 +298,14 @@
352 298
         </pattern>
353 299
       </extension>
354 300
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
355
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudents" />
356
-      <option name="METHOD_NAME" value="testSingletonInstance" />
301
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
302
+      <option name="METHOD_NAME" value="testRemoveById" />
357 303
       <option name="TEST_OBJECT" value="method" />
358 304
       <method v="2">
359 305
         <option name="Make" enabled="true" />
360 306
       </method>
361 307
     </configuration>
362
-    <configuration name="TestZipCodeWilmington.testHostLecture" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
308
+    <configuration name="TestPeople.testRemoveByPerson" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
363 309
       <module name="interfaces-1" />
364 310
       <extension name="coverage">
365 311
         <pattern>
@@ -368,27 +314,27 @@
368 314
         </pattern>
369 315
       </extension>
370 316
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
371
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestZipCodeWilmington" />
372
-      <option name="METHOD_NAME" value="testHostLecture" />
317
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
318
+      <option name="METHOD_NAME" value="testRemoveByPerson" />
373 319
       <option name="TEST_OBJECT" value="method" />
374 320
       <method v="2">
375 321
         <option name="Make" enabled="true" />
376 322
       </method>
377 323
     </configuration>
378 324
     <list>
379
-      <item itemvalue="JUnit.TestStudents.testSingletonInstance" />
380
-      <item itemvalue="JUnit.TestStudents.testInitializationSetupStudents" />
325
+      <item itemvalue="JUnit.TestPeople.testAdd" />
381 326
       <item itemvalue="JUnit.TestPeople" />
382
-      <item itemvalue="JUnit.TestInstructors" />
383
-      <item itemvalue="JUnit.TestZipCodeWilmington.testHostLecture" />
327
+      <item itemvalue="JUnit.TestPeople.testFindById" />
328
+      <item itemvalue="JUnit.TestPeople.testRemoveById" />
329
+      <item itemvalue="JUnit.TestPeople.testRemoveByPerson" />
384 330
     </list>
385 331
     <recent_temporary>
386 332
       <list>
387
-        <item itemvalue="JUnit.TestZipCodeWilmington.testHostLecture" />
388
-        <item itemvalue="JUnit.TestInstructors" />
389
-        <item itemvalue="JUnit.TestStudents.testInitializationSetupStudents" />
333
+        <item itemvalue="JUnit.TestPeople.testAdd" />
334
+        <item itemvalue="JUnit.TestPeople.testRemoveByPerson" />
335
+        <item itemvalue="JUnit.TestPeople.testRemoveById" />
336
+        <item itemvalue="JUnit.TestPeople.testFindById" />
390 337
         <item itemvalue="JUnit.TestPeople" />
391
-        <item itemvalue="JUnit.TestStudents.testSingletonInstance" />
392 338
       </list>
393 339
     </recent_temporary>
394 340
   </component>
@@ -403,50 +349,50 @@
403 349
       <option name="presentableId" value="Default" />
404 350
       <updated>1541262509774</updated>
405 351
       <workItem from="1541262511510" duration="3549000" />
406
-      <workItem from="1541332724773" duration="3863000" />
352
+      <workItem from="1541332724773" duration="6000000" />
407 353
     </task>
408 354
     <servers />
409 355
   </component>
410 356
   <component name="TestHistory">
411
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.03 at 18h 57m 29s.xml">
412
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
413
-    </history-entry>
414
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.03 at 18h 58m 06s.xml">
415
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
416
-    </history-entry>
417
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.04 at 06h 59m 09s.xml">
418
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
419
-    </history-entry>
420
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.04 at 07h 01m 23s.xml">
421
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
357
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 04m 09s.xml">
358
+      <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
422 359
     </history-entry>
423
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.04 at 07h 25m 26s.xml">
424
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
360
+    <history-entry file="TestZipCodeWilmington - 2018.11.04 at 08h 19m 45s.xml">
361
+      <configuration name="TestZipCodeWilmington" configurationId="JUnit" />
425 362
     </history-entry>
426
-    <history-entry file="TestStudents_testInitializationSetupStudents - 2018.11.04 at 07h 30m 59s.xml">
427
-      <configuration name="TestStudents.testInitializationSetupStudents" configurationId="JUnit" />
363
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 20m 27s.xml">
364
+      <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
428 365
     </history-entry>
429
-    <history-entry file="TestInstructors - 2018.11.04 at 07h 36m 48s.xml">
430
-      <configuration name="TestInstructors" configurationId="JUnit" />
366
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 23m 41s.xml">
367
+      <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
431 368
     </history-entry>
432
-    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 03m 08s.xml">
369
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 23m 57s.xml">
433 370
       <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
434 371
     </history-entry>
435
-    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 03m 15s.xml">
372
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 25m 14s.xml">
436 373
       <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
437 374
     </history-entry>
438
-    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 03m 35s.xml">
375
+    <history-entry file="TestZipCodeWilmington_testHostLecture - 2018.11.04 at 08h 30m 19s.xml">
439 376
       <configuration name="TestZipCodeWilmington.testHostLecture" configurationId="JUnit" />
440 377
     </history-entry>
378
+    <history-entry file="TestZipCodeWilmington - 2018.11.04 at 08h 30m 29s.xml">
379
+      <configuration name="TestZipCodeWilmington" configurationId="JUnit" />
380
+    </history-entry>
381
+    <history-entry file="TestInstructors - 2018.11.04 at 08h 31m 10s.xml">
382
+      <configuration name="TestInstructors" configurationId="JUnit" />
383
+    </history-entry>
384
+    <history-entry file="TestStudents - 2018.11.04 at 08h 31m 16s.xml">
385
+      <configuration name="TestStudents" configurationId="JUnit" />
386
+    </history-entry>
441 387
   </component>
442 388
   <component name="TimeTrackingManager">
443
-    <option name="totallyTimeSpent" value="11630000" />
389
+    <option name="totallyTimeSpent" value="13767000" />
444 390
   </component>
445 391
   <component name="ToolWindowManager">
446
-    <frame x="289" y="23" width="1280" height="958" extended-state="0" />
392
+    <frame x="400" y="23" width="1280" height="958" extended-state="0" />
447 393
     <editor active="true" />
448 394
     <layout>
449
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2536349" />
395
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2536349" />
450 396
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
451 397
       <window_info id="Capture Tool" order="2" />
452 398
       <window_info id="Image Layers" order="3" />
@@ -464,7 +410,7 @@
464 410
       <window_info anchor="bottom" id="Terminal" order="8" />
465 411
       <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
466 412
       <window_info anchor="bottom" id="Version Control" order="10" show_stripe_button="false" />
467
-      <window_info active="true" anchor="bottom" id="Messages" order="11" visible="true" weight="0.32794458" />
413
+      <window_info anchor="bottom" id="Messages" order="11" visible="true" weight="0.32794458" />
468 414
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
469 415
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
470 416
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -520,63 +466,41 @@
520 466
         </state>
521 467
       </provider>
522 468
     </entry>
523
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java">
469
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
524 470
       <provider selected="true" editor-type-id="text-editor">
525
-        <state relative-caret-position="445">
526
-          <caret line="84" lean-forward="true" selection-start-line="5" selection-end-line="84" />
527
-          <folding>
528
-            <element signature="imports" expanded="true" />
529
-          </folding>
471
+        <state relative-caret-position="30">
472
+          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
530 473
         </state>
531 474
       </provider>
532 475
     </entry>
533
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
476
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
534 477
       <provider selected="true" editor-type-id="text-editor">
535
-        <state relative-caret-position="885">
536
-          <caret line="59" column="1" lean-forward="true" selection-start-line="8" selection-start-column="4" selection-end-line="59" selection-end-column="1" />
537
-          <folding>
538
-            <element signature="imports" expanded="true" />
539
-          </folding>
478
+        <state relative-caret-position="30">
479
+          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
540 480
         </state>
541 481
       </provider>
542 482
     </entry>
543
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java">
483
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
544 484
       <provider selected="true" editor-type-id="text-editor">
545
-        <state relative-caret-position="210">
546
-          <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
485
+        <state relative-caret-position="285">
486
+          <caret line="19" column="35" lean-forward="true" selection-start-line="19" selection-start-column="35" selection-end-line="19" selection-end-column="35" />
547 487
         </state>
548 488
       </provider>
549 489
     </entry>
550
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudents.java">
490
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
551 491
       <provider selected="true" editor-type-id="text-editor">
552 492
         <state relative-caret-position="75">
553
-          <caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
554
-          <folding>
555
-            <element signature="imports" expanded="true" />
556
-          </folding>
557
-        </state>
558
-      </provider>
559
-    </entry>
560
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructors.java">
561
-      <provider selected="true" editor-type-id="text-editor">
562
-        <state relative-caret-position="390">
563
-          <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
564
-          <folding>
565
-            <element signature="imports" expanded="true" />
566
-          </folding>
493
+          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
567 494
         </state>
568 495
       </provider>
569 496
     </entry>
570
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
497
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java">
571 498
       <provider selected="true" editor-type-id="text-editor">
572
-        <state relative-caret-position="60">
573
-          <caret line="4" column="7" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
499
+        <state relative-caret-position="420">
500
+          <caret line="28" column="9" lean-forward="true" selection-start-line="28" selection-start-column="9" selection-end-line="28" selection-end-column="9" />
574 501
           <folding>
575
-            <element signature="e#152#160#0" expanded="true" />
576
-            <element signature="e#173#174#0" expanded="true" />
577
-            <element signature="e#229#230#0" expanded="true" />
578
-            <element signature="e#753#754#0" expanded="true" />
579
-            <element signature="e#793#794#0" expanded="true" />
502
+            <element signature="e#392#393#0" expanded="true" />
503
+            <element signature="e#423#424#0" expanded="true" />
580 504
           </folding>
581 505
         </state>
582 506
       </provider>
@@ -588,49 +512,67 @@
588 512
         </state>
589 513
       </provider>
590 514
     </entry>
591
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
515
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java">
592 516
       <provider selected="true" editor-type-id="text-editor">
593
-        <state relative-caret-position="30">
594
-          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
517
+        <state relative-caret-position="240">
518
+          <caret line="16" column="14" lean-forward="true" selection-start-line="16" selection-start-column="14" selection-end-line="16" selection-end-column="14" />
519
+          <folding>
520
+            <element signature="imports" expanded="true" />
521
+          </folding>
595 522
         </state>
596 523
       </provider>
597 524
     </entry>
598
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
525
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructors.java">
599 526
       <provider selected="true" editor-type-id="text-editor">
600
-        <state relative-caret-position="30">
601
-          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
527
+        <state relative-caret-position="390">
528
+          <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
529
+          <folding>
530
+            <element signature="imports" expanded="true" />
531
+          </folding>
602 532
         </state>
603 533
       </provider>
604 534
     </entry>
605
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
535
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudents.java">
606 536
       <provider selected="true" editor-type-id="text-editor">
607 537
         <state relative-caret-position="75">
608
-          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
538
+          <caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
539
+          <folding>
540
+            <element signature="imports" expanded="true" />
541
+          </folding>
609 542
         </state>
610 543
       </provider>
611 544
     </entry>
612
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
545
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java">
613 546
       <provider selected="true" editor-type-id="text-editor">
614
-        <state relative-caret-position="285">
615
-          <caret line="19" column="35" lean-forward="true" selection-start-line="19" selection-start-column="35" selection-end-line="19" selection-end-column="35" />
547
+        <state relative-caret-position="360">
548
+          <caret line="24" column="4" selection-start-line="24" selection-start-column="4" selection-end-line="35" selection-end-column="5" />
616 549
         </state>
617 550
       </provider>
618 551
     </entry>
619
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java">
552
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
620 553
       <provider selected="true" editor-type-id="text-editor">
621 554
         <state relative-caret-position="165">
622
-          <caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
555
+          <caret line="11" column="8" selection-start-line="11" selection-start-column="8" selection-end-line="13" selection-end-column="55" />
623 556
           <folding>
624
-            <element signature="e#392#393#0" expanded="true" />
625
-            <element signature="e#423#424#0" expanded="true" />
557
+            <element signature="imports" expanded="true" />
626 558
           </folding>
627 559
         </state>
628 560
       </provider>
629 561
     </entry>
630
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java">
562
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
563
+      <provider selected="true" editor-type-id="text-editor">
564
+        <state relative-caret-position="555">
565
+          <caret line="45" column="35" selection-start-line="45" selection-start-column="35" selection-end-line="45" selection-end-column="35" />
566
+          <folding>
567
+            <element signature="imports" expanded="true" />
568
+          </folding>
569
+        </state>
570
+      </provider>
571
+    </entry>
572
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java">
631 573
       <provider selected="true" editor-type-id="text-editor">
632
-        <state relative-caret-position="225">
633
-          <caret line="15" selection-start-line="15" selection-end-line="16" selection-end-column="57" />
574
+        <state relative-caret-position="1095">
575
+          <caret line="73" column="5" selection-start-line="73" selection-start-column="5" selection-end-line="73" selection-end-column="5" />
634 576
           <folding>
635 577
             <element signature="imports" expanded="true" />
636 578
           </folding>

+ 15
- 1
src/main/java/io/zipcoder/interfaces/Instructors.java View File

@@ -1,6 +1,8 @@
1 1
 package io.zipcoder.interfaces;
2 2
 
3
-public final class Instructors extends People{
3
+import java.lang.reflect.Array;
4
+
5
+public final class Instructors extends People<Instructor>{
4 6
 
5 7
     private static Instructors INSTANCE = new Instructors();
6 8
 
@@ -20,4 +22,16 @@ public final class Instructors extends People{
20 22
         return INSTANCE;
21 23
     }
22 24
 
25
+    public Instructor[] getArray() {
26
+
27
+        Instructor[] instructors = new Instructor[personList.size()];
28
+
29
+        int index = 0;
30
+        for (Instructor i : personList) {
31
+            instructors[index] = i;
32
+            index++;
33
+        }
34
+
35
+        return instructors;
36
+    }
23 37
 }

+ 10
- 17
src/main/java/io/zipcoder/interfaces/People.java View File

@@ -1,26 +1,27 @@
1 1
 package io.zipcoder.interfaces;
2 2
 
3
+import java.lang.reflect.Array;
3 4
 import java.util.ArrayList;
4 5
 
5
-public class People {
6
+public abstract class People<E extends Person> {
6 7
 
7
-    protected ArrayList<Person> personList = new ArrayList<Person>();
8
+    ArrayList<E> personList = new ArrayList<E>();
8 9
 
9 10
     public People() {
10
-        this.personList = new ArrayList<Person>();
11
+        this.personList = new ArrayList<E>();
11 12
     }
12 13
 
13
-    public void add(Person person) {
14
+    public void add(E person) {
14 15
         this.personList.add(person);
15 16
     }
16 17
 
17
-    public void remove(Person person) {
18
+    public void remove(E person) {
18 19
         this.personList.remove(person);
19 20
     }
20 21
 
21 22
     public void remove(long id) {
22 23
 
23
-        for(Person p : personList) {
24
+        for(E p : personList) {
24 25
             if(p.getId() == id) {
25 26
                 this.personList.remove(p);
26 27
             }
@@ -28,9 +29,9 @@ public class People {
28 29
 
29 30
     }
30 31
 
31
-    public Person findById(long id) {
32
+    public E findById(long id) {
32 33
 
33
-        for(Person p : personList) {
34
+        for(E p : personList) {
34 35
             if(p.getId() == id) {
35 36
                 return p;
36 37
             }
@@ -42,13 +43,5 @@ public class People {
42 43
         return this.personList.size();
43 44
     }
44 45
 
45
-    public Person[] getArray() {
46
-        Person[] arr = new Person[getCount()];
47
-        int index = 0;
48
-        for(Person p : this.personList) {
49
-            arr[index] = p;
50
-            index++;
51
-        }
52
-        return arr;
53
-    }
46
+    public abstract E[] getArray();
54 47
 }

+ 14
- 1
src/main/java/io/zipcoder/interfaces/Students.java View File

@@ -4,7 +4,7 @@ import com.sun.org.apache.bcel.internal.generic.INSTANCEOF;
4 4
 
5 5
 import java.util.ArrayList;
6 6
 
7
-public final class Students extends People{
7
+public final class Students extends People<Student>{
8 8
 
9 9
     private static Students INSTANCE = new Students();
10 10
 
@@ -57,5 +57,18 @@ public final class Students extends People{
57 57
         return INSTANCE;
58 58
     }
59 59
 
60
+    public Student[] getArray() {
61
+
62
+        Student[] students = new Student[personList.size()];
63
+
64
+        int index = 0;
65
+        for (Student i : personList) {
66
+            students[index] = i;
67
+            index++;
68
+        }
69
+
70
+        return students;
71
+    }
72
+
60 73
 }
61 74
 

+ 2
- 8
src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java View File

@@ -16,19 +16,13 @@ public final class ZipCodeWilmington {
16 16
 
17 17
     public static void hostLecture(Teacher teacher, double numberOfHours) {
18 18
 
19
-        Person[] studentsArray = students.getArray();
20
-        Student[] studentsArray2 = (Student[]) studentsArray;
21
-
22
-        teacher.lecture(studentsArray2, numberOfHours);
19
+        teacher.lecture(students.getArray(), numberOfHours);
23 20
 
24 21
     }
25 22
 
26 23
     public void hostLecture(long id, double numberOfHours) {
27 24
 
28
-        Person[] instructorsArray = instructors.getArray();
29
-        Instructor[] instructorsArray2 = (Instructor[]) instructorsArray;
30
-
31
-        for(Instructor i : instructorsArray2) {
25
+        for(Instructor i : instructors.getArray()) {
32 26
             if (i.getId() == id) {
33 27
                 hostLecture(i, numberOfHours);
34 28
             }

+ 30
- 34
src/test/java/io/zipcoder/interfaces/TestPeople.java View File

@@ -5,18 +5,23 @@ import org.junit.Test;
5 5
 
6 6
 public class TestPeople {
7 7
 
8
-    Instructor instructor = new Instructor(2, "sue");
9
-    Student student = new Student(1, "Bob");
10
-    People people = new People();
8
+    Instructors instructors = Instructors.getInstance();
9
+    Students students2 = Students.getInstance();
10
+    Student s1 = new Student(51, "Ned Redmond");
11
+    Student s2 =new Student(52, "Seth Abrams");
12
+    Student s3 = new Student(53, "Akeem Cherry");
11 13
 
12 14
     @Test
13 15
     public void testAdd() {
14 16
         //Given
15
-        int expected = 1;
17
+        int before = students2.getCount();
18
+        int expected = before + 3;
16 19
 
17 20
         //When
18
-        people.add(student);
19
-        int actual = people.getCount();
21
+        students2.add(s1);
22
+        students2.add(s2);
23
+        students2.add(s3);
24
+        int actual = students2.getCount();
20 25
 
21 26
         //Then
22 27
         Assert.assertEquals(expected, actual, 0.01);
@@ -25,13 +30,15 @@ public class TestPeople {
25 30
     @Test
26 31
     public void testRemoveByPerson() {
27 32
         //Given
28
-        int expected = 1;
33
+        int before = students2.getCount();
34
+        int expected = before + 2;
29 35
 
30 36
         //When
31
-        people.add(student);
32
-        people.add(instructor);
33
-        people.remove(student);
34
-        int actual = people.getCount();
37
+        students2.add(s1);
38
+        students2.add(s2);
39
+        students2.add(s3);
40
+        students2.remove(s2);
41
+        int actual = students2.getCount();
35 42
 
36 43
         //Then
37 44
         Assert.assertEquals(expected, actual, 0.01);
@@ -40,13 +47,15 @@ public class TestPeople {
40 47
     @Test
41 48
     public void testRemoveById() {
42 49
         //Given
43
-        int expected = 1;
50
+        int before = students2.getCount();
51
+        int expected = before + 2;
44 52
 
45 53
         //When
46
-        people.add(student);
47
-        people.add(instructor);
48
-        people.remove(1);
49
-        int actual = people.getCount();
54
+        students2.add(s1);
55
+        students2.add(s2);
56
+        students2.add(s3);
57
+        students2.remove(52);
58
+        int actual = students2.getCount();
50 59
 
51 60
         //Then
52 61
         Assert.assertEquals(expected, actual, 0.01);
@@ -55,26 +64,13 @@ public class TestPeople {
55 64
     @Test
56 65
     public void testFindById() {
57 66
         //Given
58
-        Person expected = instructor;
67
+        Person expected = s2;
59 68
 
60 69
         //When
61
-        people.add(student);
62
-        people.add(instructor);
63
-        Person actual = people.findById(2);
64
-
65
-        //Then
66
-        Assert.assertEquals(expected, actual);
67
-    }
68
-
69
-    @Test
70
-    public void testGetArray() {
71
-        //Given
72
-        Person[] expected = {student, instructor};
73
-
74
-        //When
75
-        people.add(student);
76
-        people.add(instructor);
77
-        Person[] actual = people.getArray();
70
+        students2.add(s1);
71
+        students2.add(s2);
72
+        students2.add(s3);
73
+        Student actual = students2.findById(52);
78 74
 
79 75
         //Then
80 76
         Assert.assertEquals(expected, actual);

+ 3
- 18
src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java View File

@@ -6,32 +6,17 @@ import org.junit.Test;
6 6
 public class TestZipCodeWilmington {
7 7
 
8 8
     ZipCodeWilmington zipCode = ZipCodeWilmington.getInstance();
9
-
10 9
     Students students = Students.getInstance();
11
-    Instructors instructors = Instructors.getInstance();
12
-
13
-//    Person[] instructorsArray = instructors.getArray();
14
-//    Instructor[] instructorsArray2 = (Instructor[]) instructorsArray;
15
-
16
-    Person[] studentsArray = students.getArray();
17
-    Student[] studentsArray2 = (Student[]) studentsArray;
18 10
 
19 11
     @Test
20 12
     public void testHostLecture() {
21 13
         //Given
22
-        double before = 0.0;
23
-        for(Student s : studentsArray2) {
24
-            before += s.getTotalStudyTime();
25
-        }
14
+        double before = students.getArray()[0].getTotalStudyTime();
26 15
         double expected = before + 1.0;
27 16
 
28 17
         //When
29
-        ZipCodeWilmington.getInstance().hostLecture(103, 39);
30
-        double after = 0.0;
31
-        for(Student s : studentsArray2) {
32
-            after += s.getTotalStudyTime();
33
-        }
34
-        double actual = after;
18
+        zipCode.hostLecture(103, 39);
19
+        double actual = students.getArray()[0].getTotalStudyTime();
35 20
 
36 21
         //Then
37 22
         Assert.assertEquals(expected, actual, 0.1);