Jacqueline Joson 6 vuotta sitten
vanhempi
commit
79325a981a

+ 153
- 131
.idea/workspace.xml Näytä tiedosto

@@ -2,8 +2,9 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="1691c4d3-c1b9-43dc-9250-95c93a250ec9" name="Default Changelist" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
5 6
       <change beforePath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" afterDir="false" />
7
+      <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" />
7 8
     </list>
8 9
     <ignored path="$PROJECT_DIR$/target/" />
9 10
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -12,6 +13,20 @@
12 13
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13 14
     <option name="LAST_RESOLUTION" value="IGNORE" />
14 15
   </component>
16
+  <component name="DatabaseView">
17
+    <option name="SHOW_INTERMEDIATE" value="true" />
18
+    <option name="GROUP_DATA_SOURCES" value="true" />
19
+    <option name="GROUP_SCHEMA" value="true" />
20
+    <option name="GROUP_CONTENTS" value="false" />
21
+    <option name="SORT_POSITIONED" value="false" />
22
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
23
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
24
+    <option name="HIDDEN_KINDS">
25
+      <set />
26
+    </option>
27
+    <expand />
28
+    <select />
29
+  </component>
15 30
   <component name="FUSProjectUsageTrigger">
16 31
     <session id="-1952372258">
17 32
       <usages-collector id="statistics.lifecycle.project">
@@ -22,7 +37,7 @@
22 37
       </usages-collector>
23 38
       <usages-collector id="statistics.file.extensions.open">
24 39
         <counts>
25
-          <entry key="java" value="12" />
40
+          <entry key="java" value="16" />
26 41
           <entry key="md" value="1" />
27 42
           <entry key="project" value="1" />
28 43
           <entry key="xml" value="1" />
@@ -31,19 +46,19 @@
31 46
       <usages-collector id="statistics.file.types.open">
32 47
         <counts>
33 48
           <entry key="Eclipse" value="1" />
34
-          <entry key="JAVA" value="12" />
49
+          <entry key="JAVA" value="16" />
35 50
           <entry key="Markdown" value="1" />
36 51
           <entry key="XML" value="1" />
37 52
         </counts>
38 53
       </usages-collector>
39 54
       <usages-collector id="statistics.file.extensions.edit">
40 55
         <counts>
41
-          <entry key="java" value="2090" />
56
+          <entry key="java" value="4554" />
42 57
         </counts>
43 58
       </usages-collector>
44 59
       <usages-collector id="statistics.file.types.edit">
45 60
         <counts>
46
-          <entry key="JAVA" value="2090" />
61
+          <entry key="JAVA" value="4554" />
47 62
         </counts>
48 63
       </usages-collector>
49 64
     </session>
@@ -53,8 +68,8 @@
53 68
       <file pinned="false" current-in-tab="false">
54 69
         <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
55 70
           <provider selected="true" editor-type-id="text-editor">
56
-            <state relative-caret-position="205">
57
-              <caret line="28" column="19" lean-forward="true" selection-start-line="28" selection-start-column="19" selection-end-line="28" selection-end-column="19" />
71
+            <state relative-caret-position="156">
72
+              <caret line="19" column="27" selection-start-line="19" selection-start-column="27" selection-end-line="19" selection-end-column="27" />
58 73
               <folding>
59 74
                 <element signature="e#147#148#0" expanded="true" />
60 75
                 <element signature="e#169#170#0" expanded="true" />
@@ -107,46 +122,28 @@
107 122
         </entry>
108 123
       </file>
109 124
       <file pinned="false" current-in-tab="false">
110
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
125
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
111 126
           <provider selected="true" editor-type-id="text-editor">
112
-            <state relative-caret-position="136">
113
-              <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
127
+            <state relative-caret-position="198">
128
+              <caret line="21" column="9" lean-forward="true" selection-start-line="21" selection-start-column="9" selection-end-line="21" selection-end-column="9" />
114 129
             </state>
115 130
           </provider>
116 131
         </entry>
117 132
       </file>
118 133
       <file pinned="false" current-in-tab="false">
119
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
134
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
120 135
           <provider selected="true" editor-type-id="text-editor">
121
-            <state relative-caret-position="340">
122
-              <caret line="20" selection-start-line="20" selection-end-line="20" />
123
-              <folding>
124
-                <element signature="e#124#125#0" expanded="true" />
125
-                <element signature="e#149#150#0" expanded="true" />
126
-                <element signature="e#227#228#0" expanded="true" />
127
-                <element signature="e#249#250#0" expanded="true" />
128
-              </folding>
136
+            <state relative-caret-position="153">
137
+              <caret line="9" column="38" lean-forward="true" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
129 138
             </state>
130 139
           </provider>
131 140
         </entry>
132 141
       </file>
133 142
       <file pinned="false" current-in-tab="true">
134
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
135
-          <provider selected="true" editor-type-id="text-editor">
136
-            <state relative-caret-position="437">
137
-              <caret line="49" column="8" selection-start-line="49" selection-start-column="8" selection-end-line="49" selection-end-column="8" />
138
-              <folding>
139
-                <element signature="imports" expanded="true" />
140
-              </folding>
141
-            </state>
142
-          </provider>
143
-        </entry>
144
-      </file>
145
-      <file pinned="false" current-in-tab="false">
146
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java">
143
+        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java">
147 144
           <provider selected="true" editor-type-id="text-editor">
148
-            <state relative-caret-position="493">
149
-              <caret line="29" column="53" selection-start-line="29" selection-start-column="53" selection-end-line="29" selection-end-column="53" />
145
+            <state relative-caret-position="595">
146
+              <caret line="35" column="19" selection-start-line="35" selection-start-column="19" selection-end-line="35" selection-end-column="19" />
150 147
               <folding>
151 148
                 <element signature="imports" expanded="true" />
152 149
               </folding>
@@ -160,8 +157,8 @@
160 157
     <option name="RECENT_TEMPLATES">
161 158
       <list>
162 159
         <option value="Interface" />
163
-        <option value="Class" />
164 160
         <option value="JUnit4 Test Class" />
161
+        <option value="Class" />
165 162
       </list>
166 163
     </option>
167 164
   </component>
@@ -171,7 +168,6 @@
171 168
   <component name="IdeDocumentHistory">
172 169
     <option name="CHANGED_PATHS">
173 170
       <list>
174
-        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java" />
175 171
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" />
176 172
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" />
177 173
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" />
@@ -180,6 +176,10 @@
180 176
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" />
181 177
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" />
182 178
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" />
179
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java" />
180
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" />
181
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" />
182
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java" />
183 183
       </list>
184 184
     </option>
185 185
   </component>
@@ -266,7 +266,7 @@
266 266
   <component name="PropertiesComponent">
267 267
     <property name="WebServerToolWindowFactoryState" value="false" />
268 268
     <property name="aspect.path.notification.shown" value="true" />
269
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541958646110" />
269
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541966799634" />
270 270
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
271 271
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
272 272
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
@@ -303,8 +303,8 @@
303 303
       </list>
304 304
     </option>
305 305
   </component>
306
-  <component name="RunManager" selected="JUnit.TestInstructor.lectureTest">
307
-    <configuration name="TestInstructor.implementationTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
306
+  <component name="RunManager" selected="JUnit.TestPeople">
307
+    <configuration name="TestPeople" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
308 308
       <module name="interfaces-1" />
309 309
       <extension name="coverage">
310 310
         <pattern>
@@ -313,14 +313,12 @@
313 313
         </pattern>
314 314
       </extension>
315 315
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
316
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
317
-      <option name="METHOD_NAME" value="implementationTest" />
318
-      <option name="TEST_OBJECT" value="method" />
316
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
319 317
       <method v="2">
320 318
         <option name="Make" enabled="true" />
321 319
       </method>
322 320
     </configuration>
323
-    <configuration name="TestInstructor.lectureTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
321
+    <configuration name="TestPeople.addTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
324 322
       <module name="interfaces-1" />
325 323
       <extension name="coverage">
326 324
         <pattern>
@@ -329,14 +327,14 @@
329 327
         </pattern>
330 328
       </extension>
331 329
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
332
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
333
-      <option name="METHOD_NAME" value="lectureTest" />
330
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
331
+      <option name="METHOD_NAME" value="addTest" />
334 332
       <option name="TEST_OBJECT" value="method" />
335 333
       <method v="2">
336 334
         <option name="Make" enabled="true" />
337 335
       </method>
338 336
     </configuration>
339
-    <configuration name="TestInstructor.teachTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
337
+    <configuration name="TestPeople.findByIdTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
340 338
       <module name="interfaces-1" />
341 339
       <extension name="coverage">
342 340
         <pattern>
@@ -345,14 +343,14 @@
345 343
         </pattern>
346 344
       </extension>
347 345
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
348
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
349
-      <option name="METHOD_NAME" value="teachTest" />
346
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
347
+      <option name="METHOD_NAME" value="findByIdTest" />
350 348
       <option name="TEST_OBJECT" value="method" />
351 349
       <method v="2">
352 350
         <option name="Make" enabled="true" />
353 351
       </method>
354 352
     </configuration>
355
-    <configuration name="TestStudent.implementationTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
353
+    <configuration name="TestPeople.removeTest1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
356 354
       <module name="interfaces-1" />
357 355
       <extension name="coverage">
358 356
         <pattern>
@@ -361,14 +359,14 @@
361 359
         </pattern>
362 360
       </extension>
363 361
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
364
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
365
-      <option name="METHOD_NAME" value="implementationTest" />
362
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
363
+      <option name="METHOD_NAME" value="removeTest1" />
366 364
       <option name="TEST_OBJECT" value="method" />
367 365
       <method v="2">
368 366
         <option name="Make" enabled="true" />
369 367
       </method>
370 368
     </configuration>
371
-    <configuration name="TestStudent.learnTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
369
+    <configuration name="TestPeople.removeTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
372 370
       <module name="interfaces-1" />
373 371
       <extension name="coverage">
374 372
         <pattern>
@@ -377,27 +375,27 @@
377 375
         </pattern>
378 376
       </extension>
379 377
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
380
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
381
-      <option name="METHOD_NAME" value="learnTest" />
378
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPeople" />
379
+      <option name="METHOD_NAME" value="removeTest2" />
382 380
       <option name="TEST_OBJECT" value="method" />
383 381
       <method v="2">
384 382
         <option name="Make" enabled="true" />
385 383
       </method>
386 384
     </configuration>
387 385
     <list>
388
-      <item itemvalue="JUnit.TestStudent.implementationTest" />
389
-      <item itemvalue="JUnit.TestStudent.learnTest" />
390
-      <item itemvalue="JUnit.TestInstructor.implementationTest" />
391
-      <item itemvalue="JUnit.TestInstructor.teachTest" />
392
-      <item itemvalue="JUnit.TestInstructor.lectureTest" />
386
+      <item itemvalue="JUnit.TestPeople.addTest" />
387
+      <item itemvalue="JUnit.TestPeople.findByIdTest" />
388
+      <item itemvalue="JUnit.TestPeople.removeTest1" />
389
+      <item itemvalue="JUnit.TestPeople.removeTest2" />
390
+      <item itemvalue="JUnit.TestPeople" />
393 391
     </list>
394 392
     <recent_temporary>
395 393
       <list>
396
-        <item itemvalue="JUnit.TestInstructor.lectureTest" />
397
-        <item itemvalue="JUnit.TestInstructor.teachTest" />
398
-        <item itemvalue="JUnit.TestInstructor.implementationTest" />
399
-        <item itemvalue="JUnit.TestStudent.learnTest" />
400
-        <item itemvalue="JUnit.TestStudent.implementationTest" />
394
+        <item itemvalue="JUnit.TestPeople" />
395
+        <item itemvalue="JUnit.TestPeople.removeTest2" />
396
+        <item itemvalue="JUnit.TestPeople.removeTest1" />
397
+        <item itemvalue="JUnit.TestPeople.findByIdTest" />
398
+        <item itemvalue="JUnit.TestPeople.addTest" />
401 399
       </list>
402 400
     </recent_temporary>
403 401
   </component>
@@ -411,44 +409,44 @@
411 409
       <option name="number" value="Default" />
412 410
       <option name="presentableId" value="Default" />
413 411
       <updated>1541263186393</updated>
414
-      <workItem from="1541263187731" duration="5974000" />
412
+      <workItem from="1541263187731" duration="12394000" />
415 413
     </task>
416 414
     <servers />
417 415
   </component>
418 416
   <component name="TestHistory">
419
-    <history-entry file="TestStudent_implementationTest - 2018.11.11 at 12h 14m 35s.xml">
420
-      <configuration name="TestStudent.implementationTest" configurationId="JUnit" />
417
+    <history-entry file="TestInstructor_lectureTest - 2018.11.11 at 12h 50m 35s.xml">
418
+      <configuration name="TestInstructor.lectureTest" configurationId="JUnit" />
421 419
     </history-entry>
422
-    <history-entry file="TestStudent_implementationTest - 2018.11.11 at 12h 14m 49s.xml">
423
-      <configuration name="TestStudent.implementationTest" configurationId="JUnit" />
420
+    <history-entry file="TestPeople_addTest - 2018.11.11 at 13h 32m 35s.xml">
421
+      <configuration name="TestPeople.addTest" configurationId="JUnit" />
424 422
     </history-entry>
425
-    <history-entry file="TestStudent_implementationTest - 2018.11.11 at 12h 15m 07s.xml">
426
-      <configuration name="TestStudent.implementationTest" configurationId="JUnit" />
423
+    <history-entry file="TestPeople_addTest - 2018.11.11 at 13h 32m 43s.xml">
424
+      <configuration name="TestPeople.addTest" configurationId="JUnit" />
427 425
     </history-entry>
428
-    <history-entry file="TestStudent_implementationTest - 2018.11.11 at 12h 15m 14s.xml">
429
-      <configuration name="TestStudent.implementationTest" configurationId="JUnit" />
426
+    <history-entry file="TestPeople_addTest - 2018.11.11 at 13h 34m 52s.xml">
427
+      <configuration name="TestPeople.addTest" configurationId="JUnit" />
430 428
     </history-entry>
431
-    <history-entry file="TestStudent_implementationTest - 2018.11.11 at 12h 15m 20s.xml">
432
-      <configuration name="TestStudent.implementationTest" configurationId="JUnit" />
429
+    <history-entry file="TestPeople_findByIdTest - 2018.11.11 at 14h 12m 08s.xml">
430
+      <configuration name="TestPeople.findByIdTest" configurationId="JUnit" />
433 431
     </history-entry>
434
-    <history-entry file="TestStudent_learnTest - 2018.11.11 at 12h 25m 21s.xml">
435
-      <configuration name="TestStudent.learnTest" configurationId="JUnit" />
432
+    <history-entry file="TestPeople_removeTest1 - 2018.11.11 at 14h 21m 50s.xml">
433
+      <configuration name="TestPeople.removeTest1" configurationId="JUnit" />
436 434
     </history-entry>
437
-    <history-entry file="TestStudent_learnTest - 2018.11.11 at 12h 25m 29s.xml">
438
-      <configuration name="TestStudent.learnTest" configurationId="JUnit" />
435
+    <history-entry file="TestPeople_removeTest1 - 2018.11.11 at 14h 24m 33s.xml">
436
+      <configuration name="TestPeople.removeTest1" configurationId="JUnit" />
439 437
     </history-entry>
440
-    <history-entry file="TestStudent_learnTest - 2018.11.11 at 12h 25m 42s.xml">
441
-      <configuration name="TestStudent.learnTest" configurationId="JUnit" />
438
+    <history-entry file="TestPeople_removeTest1 - 2018.11.11 at 14h 24m 50s.xml">
439
+      <configuration name="TestPeople.removeTest1" configurationId="JUnit" />
442 440
     </history-entry>
443
-    <history-entry file="TestInstructor_implementationTest - 2018.11.11 at 12h 38m 13s.xml">
444
-      <configuration name="TestInstructor.implementationTest" configurationId="JUnit" />
441
+    <history-entry file="TestPeople_removeTest1 - 2018.11.11 at 14h 25m 08s.xml">
442
+      <configuration name="TestPeople.removeTest1" configurationId="JUnit" />
445 443
     </history-entry>
446
-    <history-entry file="TestInstructor_teachTest - 2018.11.11 at 12h 44m 39s.xml">
447
-      <configuration name="TestInstructor.teachTest" configurationId="JUnit" />
444
+    <history-entry file="TestPeople_removeTest2 - 2018.11.11 at 14h 29m 36s.xml">
445
+      <configuration name="TestPeople.removeTest2" configurationId="JUnit" />
448 446
     </history-entry>
449 447
   </component>
450 448
   <component name="TimeTrackingManager">
451
-    <option name="totallyTimeSpent" value="5974000" />
449
+    <option name="totallyTimeSpent" value="12394000" />
452 450
   </component>
453 451
   <component name="ToolWindowManager">
454 452
     <frame x="0" y="0" width="1280" height="800" extended-state="0" />
@@ -459,16 +457,16 @@
459 457
       <window_info id="UI Designer" />
460 458
       <window_info id="Capture Tool" />
461 459
       <window_info id="Favorites" side_tool="true" />
462
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.28675282" />
460
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.28675282" />
463 461
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
464
-      <window_info anchor="bottom" id="Messages" weight="0.32876712" />
462
+      <window_info active="true" anchor="bottom" id="Messages" visible="true" weight="0.32876712" />
465 463
       <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
466 464
       <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
467 465
       <window_info anchor="bottom" id="Terminal" />
468 466
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
469 467
       <window_info anchor="bottom" id="Message" order="0" />
470 468
       <window_info anchor="bottom" id="Find" order="1" />
471
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.27945206" />
469
+      <window_info anchor="bottom" id="Run" order="2" weight="0.27945206" />
472 470
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
473 471
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
474 472
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -477,7 +475,7 @@
477 475
       <window_info anchor="right" id="Theme Preview" />
478 476
       <window_info anchor="right" id="Capture Analysis" />
479 477
       <window_info anchor="right" id="Palette&#9;" />
480
-      <window_info anchor="right" id="Database" />
478
+      <window_info anchor="right" id="Database" weight="0.32956383" />
481 479
       <window_info anchor="right" id="Maven Projects" />
482 480
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
483 481
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@@ -507,35 +505,6 @@
507 505
         </state>
508 506
       </provider>
509 507
     </entry>
510
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
511
-      <provider selected="true" editor-type-id="text-editor">
512
-        <state relative-caret-position="205">
513
-          <caret line="28" column="19" lean-forward="true" selection-start-line="28" selection-start-column="19" selection-end-line="28" selection-end-column="19" />
514
-          <folding>
515
-            <element signature="e#147#148#0" expanded="true" />
516
-            <element signature="e#169#170#0" expanded="true" />
517
-            <element signature="e#105#106#0" expanded="true" />
518
-            <element signature="e#133#134#0" expanded="true" />
519
-            <element signature="e#149#150#0" expanded="true" />
520
-            <element signature="e#182#183#0" expanded="true" />
521
-            <element signature="e#372#373#0" expanded="true" />
522
-            <element signature="e#399#400#0" expanded="true" />
523
-            <element signature="e#487#488#0" expanded="true" />
524
-            <element signature="e#519#520#0" expanded="true" />
525
-          </folding>
526
-        </state>
527
-      </provider>
528
-    </entry>
529
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java">
530
-      <provider selected="true" editor-type-id="text-editor">
531
-        <state relative-caret-position="493">
532
-          <caret line="29" column="53" selection-start-line="29" selection-start-column="53" selection-end-line="29" selection-end-column="53" />
533
-          <folding>
534
-            <element signature="imports" expanded="true" />
535
-          </folding>
536
-        </state>
537
-      </provider>
538
-    </entry>
539 508
     <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentTest.java">
540 509
       <provider selected="true" editor-type-id="text-editor">
541 510
         <state relative-caret-position="136">
@@ -565,10 +534,26 @@
565 534
         </state>
566 535
       </provider>
567 536
     </entry>
568
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
537
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
569 538
       <provider selected="true" editor-type-id="text-editor">
570
-        <state relative-caret-position="561">
571
-          <caret line="34" column="30" selection-start-line="34" selection-start-column="30" selection-end-line="34" selection-end-column="30" />
539
+        <state relative-caret-position="326">
540
+          <caret line="52" column="67" selection-start-line="52" selection-start-column="67" selection-end-line="52" selection-end-column="67" />
541
+          <folding>
542
+            <element signature="imports" expanded="true" />
543
+          </folding>
544
+        </state>
545
+      </provider>
546
+    </entry>
547
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
548
+      <provider selected="true" editor-type-id="text-editor">
549
+        <state relative-caret-position="340">
550
+          <caret line="20" selection-start-line="20" selection-end-line="20" />
551
+          <folding>
552
+            <element signature="e#124#125#0" expanded="true" />
553
+            <element signature="e#149#150#0" expanded="true" />
554
+            <element signature="e#227#228#0" expanded="true" />
555
+            <element signature="e#249#250#0" expanded="true" />
556
+          </folding>
572 557
         </state>
573 558
       </provider>
574 559
     </entry>
@@ -579,23 +564,60 @@
579 564
         </state>
580 565
       </provider>
581 566
     </entry>
582
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
567
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
583 568
       <provider selected="true" editor-type-id="text-editor">
584
-        <state relative-caret-position="340">
585
-          <caret line="20" selection-start-line="20" selection-end-line="20" />
569
+        <state relative-caret-position="561">
570
+          <caret line="34" column="30" selection-start-line="34" selection-start-column="30" selection-end-line="34" selection-end-column="30" />
571
+        </state>
572
+      </provider>
573
+    </entry>
574
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java">
575
+      <provider selected="true" editor-type-id="text-editor">
576
+        <state relative-caret-position="309">
577
+          <caret line="29" column="53" selection-start-line="29" selection-start-column="53" selection-end-line="29" selection-end-column="53" />
586 578
           <folding>
587
-            <element signature="e#124#125#0" expanded="true" />
579
+            <element signature="imports" expanded="true" />
580
+          </folding>
581
+        </state>
582
+      </provider>
583
+    </entry>
584
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
585
+      <provider selected="true" editor-type-id="text-editor">
586
+        <state relative-caret-position="156">
587
+          <caret line="19" column="27" selection-start-line="19" selection-start-column="27" selection-end-line="19" selection-end-column="27" />
588
+          <folding>
589
+            <element signature="e#147#148#0" expanded="true" />
590
+            <element signature="e#169#170#0" expanded="true" />
591
+            <element signature="e#105#106#0" expanded="true" />
592
+            <element signature="e#133#134#0" expanded="true" />
588 593
             <element signature="e#149#150#0" expanded="true" />
589
-            <element signature="e#227#228#0" expanded="true" />
590
-            <element signature="e#249#250#0" expanded="true" />
594
+            <element signature="e#182#183#0" expanded="true" />
595
+            <element signature="e#372#373#0" expanded="true" />
596
+            <element signature="e#399#400#0" expanded="true" />
597
+            <element signature="e#487#488#0" expanded="true" />
598
+            <element signature="e#519#520#0" expanded="true" />
591 599
           </folding>
592 600
         </state>
593 601
       </provider>
594 602
     </entry>
595
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
603
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
604
+      <provider selected="true" editor-type-id="text-editor">
605
+        <state relative-caret-position="198">
606
+          <caret line="21" column="9" lean-forward="true" selection-start-line="21" selection-start-column="9" selection-end-line="21" selection-end-column="9" />
607
+        </state>
608
+      </provider>
609
+    </entry>
610
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
611
+      <provider selected="true" editor-type-id="text-editor">
612
+        <state relative-caret-position="153">
613
+          <caret line="9" column="38" lean-forward="true" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
614
+        </state>
615
+      </provider>
616
+    </entry>
617
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPeople.java">
596 618
       <provider selected="true" editor-type-id="text-editor">
597
-        <state relative-caret-position="437">
598
-          <caret line="49" column="8" selection-start-line="49" selection-start-column="8" selection-end-line="49" selection-end-column="8" />
619
+        <state relative-caret-position="595">
620
+          <caret line="35" column="19" selection-start-line="35" selection-start-column="19" selection-end-line="35" selection-end-column="19" />
599 621
           <folding>
600 622
             <element signature="imports" expanded="true" />
601 623
           </folding>

+ 44
- 0
src/main/java/io/zipcoder/interfaces/People.java Näytä tiedosto

@@ -0,0 +1,44 @@
1
+package io.zipcoder.interfaces;
2
+
3
+import java.util.ArrayList;
4
+
5
+public class People {
6
+
7
+    private ArrayList <Person> personList = new ArrayList<>();
8
+
9
+    public void add(Person person) {
10
+        //Person person = new Person(123);
11
+        personList.add(person);
12
+    }
13
+
14
+    public Person findById(long id) {
15
+        Person result = null;
16
+        for (int i = 0; i < personList.size(); i++) {
17
+            if (id == (personList.get(i).getId())) {
18
+                result = personList.get(i);
19
+            } else {
20
+                result = null;
21
+            }
22
+        }
23
+        return result;
24
+    }
25
+
26
+    public void removeByName(Person person) {
27
+        for (int i = 0; i < personList.size(); i++) {
28
+            if (person.equals(personList.get(i).getName())){
29
+                personList.remove(i);
30
+            }
31
+        }
32
+    }
33
+
34
+    public void removeById(long id) {
35
+        for (int i = 0; i < personList.size(); i++) {
36
+            if (id == personList.get(i).getId()) {
37
+                personList.remove(i);
38
+            }
39
+        }
40
+    }
41
+
42
+
43
+
44
+}

+ 4
- 4
src/main/java/io/zipcoder/interfaces/Person.java Näytä tiedosto

@@ -17,10 +17,10 @@ public class Person {
17 17
         return id;
18 18
         }
19 19
 
20
-//    public Person(long id, String name) {
21
-//        this.id = id;
22
-//        this.name = name;
23
-//    }
20
+    public Person(long id, String name) {
21
+        this.id = id;
22
+        this.name = name;
23
+    }
24 24
 
25 25
     public String getName() {
26 26
         return name;

+ 23
- 0
src/main/java/io/zipcoder/interfaces/Students.java Näytä tiedosto

@@ -0,0 +1,23 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public final class Students extends People {
4
+    private static Students INSTANCE;
5
+
6
+    private Students() {
7
+        Student Jae = new Student(1);
8
+        Student Ari = new Student(2);
9
+        Student Josh = new Student(3);
10
+
11
+        this.add(Jae);
12
+        this.add(Ari);
13
+        this.add(Josh);
14
+    }
15
+
16
+    public static Students getINSTANCE() {
17
+        if (INSTANCE == null) {
18
+            INSTANCE = new Students();
19
+        }
20
+        return INSTANCE;
21
+    }
22
+
23
+}

+ 73
- 1
src/test/java/io/zipcoder/interfaces/TestPeople.java Näytä tiedosto

@@ -1,4 +1,76 @@
1 1
 package io.zipcoder.interfaces;
2 2
 
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+import java.util.ArrayList;
7
+
3 8
 public class TestPeople {
4
-}
9
+
10
+    @Test
11
+    public void addTest() {
12
+        //given
13
+        Person person = new Person(123);
14
+        Person person1 = new Person(222);
15
+        ArrayList<Person> people = new ArrayList<>();
16
+
17
+        //when
18
+        people.add(person);
19
+        people.add(person1);
20
+
21
+        //then
22
+        Assert.assertEquals(2, people.size());
23
+    }
24
+
25
+    @Test
26
+    public void findByIdTest() {
27
+        //given
28
+        Person person = new Person(123);
29
+        Person person1 = new Person(000);
30
+        ArrayList <Person> people= new ArrayList<>();
31
+        people.add(person);
32
+        people.add(person1);
33
+        Person expected = person1;
34
+
35
+        //when
36
+        //people.findById(000);
37
+
38
+        //then
39
+        // Assert.assertEquals(expected, people.findById(000));
40
+    }
41
+
42
+    @Test
43
+    public void removeTest1() {
44
+        //given
45
+        Person person = new Person(123, "Arpita");
46
+        Person person1 = new Person(000, "Jae");      //will remove, but not by name :( WHY
47
+        //People people = new People();
48
+        ArrayList<Person> peeps = new ArrayList<>();
49
+        peeps.add(person);
50
+        peeps.add(person1);
51
+        int expected = 1;
52
+
53
+        //when
54
+        peeps.remove(person);
55
+
56
+        //then
57
+        Assert.assertEquals(expected, peeps.size());
58
+    }
59
+
60
+    @Test
61
+    public void removeTest2() {
62
+        //given
63
+        Person person = new Person(123, "A");              //somethings wrong with my People class...
64
+        Person person1 = new Person(000, "J");
65
+        People people = new People();
66
+        ArrayList <Person> peeps = new ArrayList<>();
67
+        peeps.add(person);
68
+        peeps.add(person1);
69
+        int expected = 1;
70
+
71
+        //when
72
+        people.removeById(000);
73
+
74
+        Assert.assertEquals(expected, peeps.size());
75
+    }
76
+}