Browse Source

Completed part 5.0

William Brown 6 years ago
parent
commit
816666a604

+ 119
- 117
.idea/workspace.xml View File

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="c0f7ce67-c21c-4eff-a696-290be3222ea8" name="Default Changelist" comment="">
4
     <list default="true" id="c0f7ce67-c21c-4eff-a696-290be3222ea8" name="Default Changelist" comment="">
5
-      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" afterDir="false" />
7
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
     </list>
9
     </list>
9
     <ignored path="$PROJECT_DIR$/target/" />
10
     <ignored path="$PROJECT_DIR$/target/" />
24
       <FILTER>io.zipcoder.interfaces.*</FILTER>
25
       <FILTER>io.zipcoder.interfaces.*</FILTER>
25
     </SUITE>
26
     </SUITE>
26
   </component>
27
   </component>
28
+  <component name="CoverageViewManager">
29
+    <option name="myElementSize" value="176" />
30
+  </component>
27
   <component name="FUSProjectUsageTrigger">
31
   <component name="FUSProjectUsageTrigger">
28
     <session id="-945268981">
32
     <session id="-945268981">
29
       <usages-collector id="statistics.lifecycle.project">
33
       <usages-collector id="statistics.lifecycle.project">
34
       </usages-collector>
38
       </usages-collector>
35
       <usages-collector id="statistics.file.extensions.open">
39
       <usages-collector id="statistics.file.extensions.open">
36
         <counts>
40
         <counts>
37
-          <entry key="java" value="5" />
41
+          <entry key="java" value="10" />
38
           <entry key="project" value="1" />
42
           <entry key="project" value="1" />
39
         </counts>
43
         </counts>
40
       </usages-collector>
44
       </usages-collector>
41
       <usages-collector id="statistics.file.types.open">
45
       <usages-collector id="statistics.file.types.open">
42
         <counts>
46
         <counts>
43
           <entry key="Eclipse" value="1" />
47
           <entry key="Eclipse" value="1" />
44
-          <entry key="JAVA" value="5" />
48
+          <entry key="JAVA" value="10" />
45
         </counts>
49
         </counts>
46
       </usages-collector>
50
       </usages-collector>
47
       <usages-collector id="statistics.file.extensions.edit">
51
       <usages-collector id="statistics.file.extensions.edit">
48
         <counts>
52
         <counts>
49
-          <entry key="java" value="714" />
53
+          <entry key="java" value="1755" />
50
         </counts>
54
         </counts>
51
       </usages-collector>
55
       </usages-collector>
52
       <usages-collector id="statistics.file.types.edit">
56
       <usages-collector id="statistics.file.types.edit">
53
         <counts>
57
         <counts>
54
-          <entry key="JAVA" value="714" />
58
+          <entry key="JAVA" value="1755" />
55
         </counts>
59
         </counts>
56
       </usages-collector>
60
       </usages-collector>
57
     </session>
61
     </session>
58
   </component>
62
   </component>
59
   <component name="FileEditorManager">
63
   <component name="FileEditorManager">
60
     <leaf>
64
     <leaf>
61
-      <file pinned="false" current-in-tab="false">
62
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
63
-          <provider selected="true" editor-type-id="text-editor">
64
-            <state relative-caret-position="179">
65
-              <caret line="13" column="21" selection-start-line="13" selection-start-column="21" selection-end-line="13" selection-end-column="21" />
66
-              <folding>
67
-                <element signature="e#231#232#0" expanded="true" />
68
-                <element signature="e#259#260#0" expanded="true" />
69
-                <element signature="e#129#130#0" expanded="true" />
70
-                <element signature="e#156#157#0" expanded="true" />
71
-                <element signature="e#196#197#0" expanded="true" />
72
-                <element signature="e#228#229#0" expanded="true" />
73
-                <element signature="e#439#440#0" expanded="true" />
74
-                <element signature="e#464#465#0" expanded="true" />
75
-              </folding>
76
-            </state>
77
-          </provider>
78
-        </entry>
79
-      </file>
80
-      <file pinned="false" current-in-tab="false">
81
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java">
65
+      <file pinned="false" current-in-tab="true">
66
+        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
82
           <provider selected="true" editor-type-id="text-editor">
67
           <provider selected="true" editor-type-id="text-editor">
83
-            <state relative-caret-position="233">
84
-              <caret line="27" column="8" lean-forward="true" selection-start-line="27" selection-start-column="8" selection-end-line="30" selection-end-column="41" />
68
+            <state relative-caret-position="267">
69
+              <caret line="42" column="27" selection-start-line="42" selection-start-column="27" selection-end-line="42" selection-end-column="27" />
85
               <folding>
70
               <folding>
86
                 <element signature="imports" expanded="true" />
71
                 <element signature="imports" expanded="true" />
87
               </folding>
72
               </folding>
90
         </entry>
75
         </entry>
91
       </file>
76
       </file>
92
       <file pinned="false" current-in-tab="false">
77
       <file pinned="false" current-in-tab="false">
93
-        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
78
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
94
           <provider selected="true" editor-type-id="text-editor">
79
           <provider selected="true" editor-type-id="text-editor">
95
-            <state relative-caret-position="45">
96
-              <caret line="3" column="37" selection-start-line="3" selection-start-column="37" selection-end-line="3" selection-end-column="37" />
97
-            </state>
98
-          </provider>
99
-        </entry>
100
-      </file>
101
-      <file pinned="false" current-in-tab="false">
102
-        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
103
-          <provider selected="true" editor-type-id="text-editor">
104
-            <state relative-caret-position="308">
105
-              <caret line="34" column="29" selection-start-line="34" selection-start-column="29" selection-end-line="34" selection-end-column="29" />
80
+            <state relative-caret-position="315">
81
+              <caret line="21" column="1" lean-forward="true" selection-start-line="21" selection-start-column="1" selection-end-line="21" selection-end-column="1" />
106
               <folding>
82
               <folding>
107
-                <element signature="imports" expanded="true" />
83
+                <element signature="e#138#139#0" expanded="true" />
84
+                <element signature="e#169#170#0" expanded="true" />
85
+                <element signature="e#203#204#0" expanded="true" />
86
+                <element signature="e#228#229#0" expanded="true" />
87
+                <element signature="e#292#293#0" expanded="true" />
88
+                <element signature="e#315#316#0" expanded="true" />
108
               </folding>
89
               </folding>
109
             </state>
90
             </state>
110
           </provider>
91
           </provider>
111
         </entry>
92
         </entry>
112
       </file>
93
       </file>
113
-      <file pinned="false" current-in-tab="true">
94
+      <file pinned="false" current-in-tab="false">
114
         <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
95
         <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
115
           <provider selected="true" editor-type-id="text-editor">
96
           <provider selected="true" editor-type-id="text-editor">
116
-            <state relative-caret-position="188">
117
-              <caret line="15" column="40" selection-start-line="15" selection-start-column="40" selection-end-line="15" selection-end-column="40" />
97
+            <state relative-caret-position="225">
98
+              <caret line="21" selection-start-line="21" selection-end-line="21" />
118
               <folding>
99
               <folding>
119
-                <element signature="e#185#186#0" expanded="true" />
120
-                <element signature="e#216#217#0" expanded="true" />
121
-                <element signature="e#247#248#0" expanded="true" />
122
-                <element signature="e#272#273#0" expanded="true" />
123
                 <element signature="e#293#294#0" expanded="true" />
100
                 <element signature="e#293#294#0" expanded="true" />
124
-                <element signature="e#339#340#0" expanded="true" />
125
-                <element signature="e#341#342#0" expanded="true" />
126
-                <element signature="e#378#379#0" expanded="true" />
127
-                <element signature="e#438#439#0" expanded="true" />
128
-                <element signature="e#490#491#0" expanded="true" />
101
+                <element signature="e#340#341#0" expanded="true" />
129
               </folding>
102
               </folding>
130
             </state>
103
             </state>
131
           </provider>
104
           </provider>
152
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" />
125
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" />
153
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" />
126
         <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" />
154
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" />
127
         <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" />
128
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" />
129
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" />
130
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" />
155
       </list>
131
       </list>
156
     </option>
132
     </option>
157
   </component>
133
   </component>
239
   <component name="PropertiesComponent">
215
   <component name="PropertiesComponent">
240
     <property name="WebServerToolWindowFactoryState" value="false" />
216
     <property name="WebServerToolWindowFactoryState" value="false" />
241
     <property name="aspect.path.notification.shown" value="true" />
217
     <property name="aspect.path.notification.shown" value="true" />
242
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541215659696" />
218
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541218571626" />
243
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
219
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
244
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
220
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
245
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
221
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
256
       </list>
232
       </list>
257
     </option>
233
     </option>
258
   </component>
234
   </component>
259
-  <component name="RunManager" selected="JUnit.TestStudent">
260
-    <configuration name="TestStudent" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
235
+  <component name="RunManager" selected="JUnit.TestInstructor">
236
+    <configuration name="TestInstructor" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
261
       <module name="interfaces-1" />
237
       <module name="interfaces-1" />
262
       <extension name="coverage">
238
       <extension name="coverage">
263
         <pattern>
239
         <pattern>
266
         </pattern>
242
         </pattern>
267
       </extension>
243
       </extension>
268
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
244
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
269
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
245
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
270
       <method v="2">
246
       <method v="2">
271
         <option name="Make" enabled="true" />
247
         <option name="Make" enabled="true" />
272
       </method>
248
       </method>
273
     </configuration>
249
     </configuration>
274
-    <configuration name="TestStudent.testImplementation" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
250
+    <configuration name="TestInstructor.testImplementation" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
275
       <module name="interfaces-1" />
251
       <module name="interfaces-1" />
276
       <extension name="coverage">
252
       <extension name="coverage">
277
         <pattern>
253
         <pattern>
280
         </pattern>
256
         </pattern>
281
       </extension>
257
       </extension>
282
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
258
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
283
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
259
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
284
       <option name="METHOD_NAME" value="testImplementation" />
260
       <option name="METHOD_NAME" value="testImplementation" />
285
       <option name="TEST_OBJECT" value="method" />
261
       <option name="TEST_OBJECT" value="method" />
286
       <method v="2">
262
       <method v="2">
287
         <option name="Make" enabled="true" />
263
         <option name="Make" enabled="true" />
288
       </method>
264
       </method>
289
     </configuration>
265
     </configuration>
290
-    <configuration name="TestStudent.testInheritance" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
266
+    <configuration name="TestInstructor.testInheritance" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
291
       <module name="interfaces-1" />
267
       <module name="interfaces-1" />
292
       <extension name="coverage">
268
       <extension name="coverage">
293
         <pattern>
269
         <pattern>
296
         </pattern>
272
         </pattern>
297
       </extension>
273
       </extension>
298
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
274
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
299
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
275
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
300
       <option name="METHOD_NAME" value="testInheritance" />
276
       <option name="METHOD_NAME" value="testInheritance" />
301
       <option name="TEST_OBJECT" value="method" />
277
       <option name="TEST_OBJECT" value="method" />
302
       <method v="2">
278
       <method v="2">
303
         <option name="Make" enabled="true" />
279
         <option name="Make" enabled="true" />
304
       </method>
280
       </method>
305
     </configuration>
281
     </configuration>
306
-    <configuration name="TestStudent.testLearn" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
282
+    <configuration name="TestInstructor.testLecture" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
307
       <module name="interfaces-1" />
283
       <module name="interfaces-1" />
308
       <extension name="coverage">
284
       <extension name="coverage">
309
         <pattern>
285
         <pattern>
312
         </pattern>
288
         </pattern>
313
       </extension>
289
       </extension>
314
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
290
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
315
-      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestStudent" />
316
-      <option name="METHOD_NAME" value="testLearn" />
291
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
292
+      <option name="METHOD_NAME" value="testLecture" />
317
       <option name="TEST_OBJECT" value="method" />
293
       <option name="TEST_OBJECT" value="method" />
318
       <method v="2">
294
       <method v="2">
319
         <option name="Make" enabled="true" />
295
         <option name="Make" enabled="true" />
320
       </method>
296
       </method>
321
     </configuration>
297
     </configuration>
322
-    <configuration name="io.zipcoder.interfaces in interfaces-1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
298
+    <configuration name="TestInstructor.testTeach" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
323
       <module name="interfaces-1" />
299
       <module name="interfaces-1" />
324
       <extension name="coverage">
300
       <extension name="coverage">
325
         <pattern>
301
         <pattern>
328
         </pattern>
304
         </pattern>
329
       </extension>
305
       </extension>
330
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
306
       <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
331
-      <option name="TEST_OBJECT" value="package" />
307
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
308
+      <option name="METHOD_NAME" value="testTeach" />
309
+      <option name="TEST_OBJECT" value="method" />
332
       <method v="2">
310
       <method v="2">
333
         <option name="Make" enabled="true" />
311
         <option name="Make" enabled="true" />
334
       </method>
312
       </method>
335
     </configuration>
313
     </configuration>
336
     <list>
314
     <list>
337
-      <item itemvalue="JUnit.TestStudent.testImplementation" />
338
-      <item itemvalue="JUnit.TestStudent.testInheritance" />
339
-      <item itemvalue="JUnit.TestStudent.testLearn" />
340
-      <item itemvalue="JUnit.TestStudent" />
341
-      <item itemvalue="JUnit.io.zipcoder.interfaces in interfaces-1" />
315
+      <item itemvalue="JUnit.TestInstructor.testImplementation" />
316
+      <item itemvalue="JUnit.TestInstructor.testTeach" />
317
+      <item itemvalue="JUnit.TestInstructor.testLecture" />
318
+      <item itemvalue="JUnit.TestInstructor.testInheritance" />
319
+      <item itemvalue="JUnit.TestInstructor" />
342
     </list>
320
     </list>
343
     <recent_temporary>
321
     <recent_temporary>
344
       <list>
322
       <list>
345
-        <item itemvalue="JUnit.TestStudent" />
346
-        <item itemvalue="JUnit.TestStudent.testImplementation" />
347
-        <item itemvalue="JUnit.io.zipcoder.interfaces in interfaces-1" />
348
-        <item itemvalue="JUnit.TestStudent.testLearn" />
349
-        <item itemvalue="JUnit.TestStudent.testInheritance" />
323
+        <item itemvalue="JUnit.TestInstructor" />
324
+        <item itemvalue="JUnit.TestInstructor.testLecture" />
325
+        <item itemvalue="JUnit.TestInstructor.testTeach" />
326
+        <item itemvalue="JUnit.TestInstructor.testInheritance" />
327
+        <item itemvalue="JUnit.TestInstructor.testImplementation" />
350
       </list>
328
       </list>
351
     </recent_temporary>
329
     </recent_temporary>
352
   </component>
330
   </component>
360
       <option name="number" value="Default" />
338
       <option name="number" value="Default" />
361
       <option name="presentableId" value="Default" />
339
       <option name="presentableId" value="Default" />
362
       <updated>1541213342172</updated>
340
       <updated>1541213342172</updated>
363
-      <workItem from="1541213343574" duration="2003000" />
341
+      <workItem from="1541213343574" duration="4761000" />
364
     </task>
342
     </task>
365
     <servers />
343
     <servers />
366
   </component>
344
   </component>
367
   <component name="TestHistory">
345
   <component name="TestHistory">
368
-    <history-entry file="TestPerson_testConstructor - 2018.11.02 at 23h 00m 15s.xml">
369
-      <configuration name="TestPerson.testConstructor" configurationId="JUnit" />
346
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 00m 03s.xml">
347
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
370
     </history-entry>
348
     </history-entry>
371
-    <history-entry file="TestPerson_testConstructorId - 2018.11.02 at 23h 00m 21s.xml">
372
-      <configuration name="TestPerson.testConstructorId" configurationId="JUnit" />
349
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 00m 34s.xml">
350
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
373
     </history-entry>
351
     </history-entry>
374
-    <history-entry file="TestPerson_testConstructorId - 2018.11.02 at 23h 00m 24s.xml">
375
-      <configuration name="TestPerson.testConstructorId" configurationId="JUnit" />
352
+    <history-entry file="TestInstructor_testLecture - 2018.11.03 at 00h 03m 04s.xml">
353
+      <configuration name="TestInstructor.testLecture" configurationId="JUnit" />
376
     </history-entry>
354
     </history-entry>
377
-    <history-entry file="TestPerson - 2018.11.02 at 23h 00m 29s.xml">
378
-      <configuration name="TestPerson" configurationId="JUnit" />
355
+    <history-entry file="TestInstructor_testInheritance - 2018.11.03 at 00h 04m 06s.xml">
356
+      <configuration name="TestInstructor.testInheritance" configurationId="JUnit" />
379
     </history-entry>
357
     </history-entry>
380
-    <history-entry file="TestPerson_testSetName - 2018.11.02 at 23h 03m 13s.xml">
381
-      <configuration name="TestPerson.testSetName" configurationId="JUnit" />
358
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 08m 02s.xml">
359
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
382
     </history-entry>
360
     </history-entry>
383
-    <history-entry file="TestPerson - 2018.11.02 at 23h 03m 23s.xml">
384
-      <configuration name="TestPerson" configurationId="JUnit" />
361
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 11m 43s.xml">
362
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
385
     </history-entry>
363
     </history-entry>
386
-    <history-entry file="TestStudent_testInheritance - 2018.11.02 at 23h 17m 24s.xml">
387
-      <configuration name="TestStudent.testInheritance" configurationId="JUnit" />
364
+    <history-entry file="TestPerson_testConstructorId - 2018.11.03 at 00h 12m 02s.xml">
365
+      <configuration name="TestPerson.testConstructorId" configurationId="JUnit" />
388
     </history-entry>
366
     </history-entry>
389
-    <history-entry file="TestStudent_testLearn - 2018.11.02 at 23h 21m 58s.xml">
390
-      <configuration name="TestStudent.testLearn" configurationId="JUnit" />
367
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 12m 09s.xml">
368
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
391
     </history-entry>
369
     </history-entry>
392
-    <history-entry file="TestStudent_testLearn - 2018.11.02 at 23h 22m 11s.xml">
393
-      <configuration name="TestStudent.testLearn" configurationId="JUnit" />
370
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 12m 27s.xml">
371
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
394
     </history-entry>
372
     </history-entry>
395
-    <history-entry file="TestStudent_testLearn - 2018.11.02 at 23h 22m 55s.xml">
396
-      <configuration name="TestStudent.testLearn" configurationId="JUnit" />
373
+    <history-entry file="TestInstructor_testTeach - 2018.11.03 at 00h 13m 37s.xml">
374
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
397
     </history-entry>
375
     </history-entry>
398
   </component>
376
   </component>
399
   <component name="TimeTrackingManager">
377
   <component name="TimeTrackingManager">
400
-    <option name="totallyTimeSpent" value="2003000" />
378
+    <option name="totallyTimeSpent" value="4761000" />
401
   </component>
379
   </component>
402
   <component name="ToolWindowManager">
380
   <component name="ToolWindowManager">
403
     <frame x="0" y="0" width="1280" height="800" extended-state="0" />
381
     <frame x="0" y="0" width="1280" height="800" extended-state="0" />
413
       <window_info anchor="bottom" id="Messages" weight="0.32876712" />
391
       <window_info anchor="bottom" id="Messages" weight="0.32876712" />
414
       <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
392
       <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
415
       <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
393
       <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
416
-      <window_info anchor="bottom" id="Terminal" />
394
+      <window_info anchor="bottom" id="Terminal" weight="0.32876712" />
417
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
395
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
418
       <window_info anchor="bottom" id="Message" order="0" />
396
       <window_info anchor="bottom" id="Message" order="0" />
419
       <window_info anchor="bottom" id="Find" order="1" />
397
       <window_info anchor="bottom" id="Find" order="1" />
471
         </state>
449
         </state>
472
       </provider>
450
       </provider>
473
     </entry>
451
     </entry>
452
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
453
+      <provider selected="true" editor-type-id="text-editor">
454
+        <state relative-caret-position="15">
455
+          <caret line="7" column="4" selection-start-line="7" selection-start-column="4" selection-end-line="38" selection-end-column="5" />
456
+          <folding>
457
+            <element signature="imports" expanded="true" />
458
+          </folding>
459
+        </state>
460
+      </provider>
461
+    </entry>
462
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
463
+      <provider selected="true" editor-type-id="text-editor">
464
+        <state relative-caret-position="45">
465
+          <caret line="3" column="4" selection-start-line="3" selection-start-column="4" selection-end-line="3" selection-end-column="4" />
466
+        </state>
467
+      </provider>
468
+    </entry>
474
     <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
469
     <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
475
       <provider selected="true" editor-type-id="text-editor">
470
       <provider selected="true" editor-type-id="text-editor">
476
         <state relative-caret-position="45">
471
         <state relative-caret-position="45">
478
         </state>
473
         </state>
479
       </provider>
474
       </provider>
480
     </entry>
475
     </entry>
481
-    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
476
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
482
       <provider selected="true" editor-type-id="text-editor">
477
       <provider selected="true" editor-type-id="text-editor">
483
-        <state relative-caret-position="308">
484
-          <caret line="34" column="29" selection-start-line="34" selection-start-column="29" selection-end-line="34" selection-end-column="29" />
478
+        <state relative-caret-position="225">
479
+          <caret line="21" selection-start-line="21" selection-end-line="21" />
485
           <folding>
480
           <folding>
486
-            <element signature="imports" expanded="true" />
481
+            <element signature="e#293#294#0" expanded="true" />
482
+            <element signature="e#340#341#0" expanded="true" />
487
           </folding>
483
           </folding>
488
         </state>
484
         </state>
489
       </provider>
485
       </provider>
490
     </entry>
486
     </entry>
491
-    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
487
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
492
       <provider selected="true" editor-type-id="text-editor">
488
       <provider selected="true" editor-type-id="text-editor">
493
-        <state relative-caret-position="188">
494
-          <caret line="15" column="40" selection-start-line="15" selection-start-column="40" selection-end-line="15" selection-end-column="40" />
489
+        <state relative-caret-position="315">
490
+          <caret line="21" column="1" lean-forward="true" selection-start-line="21" selection-start-column="1" selection-end-line="21" selection-end-column="1" />
495
           <folding>
491
           <folding>
496
-            <element signature="e#185#186#0" expanded="true" />
497
-            <element signature="e#216#217#0" expanded="true" />
498
-            <element signature="e#247#248#0" expanded="true" />
499
-            <element signature="e#272#273#0" expanded="true" />
500
-            <element signature="e#293#294#0" expanded="true" />
501
-            <element signature="e#339#340#0" expanded="true" />
502
-            <element signature="e#341#342#0" expanded="true" />
503
-            <element signature="e#378#379#0" expanded="true" />
504
-            <element signature="e#438#439#0" expanded="true" />
505
-            <element signature="e#490#491#0" expanded="true" />
492
+            <element signature="e#138#139#0" expanded="true" />
493
+            <element signature="e#169#170#0" expanded="true" />
494
+            <element signature="e#203#204#0" expanded="true" />
495
+            <element signature="e#228#229#0" expanded="true" />
496
+            <element signature="e#292#293#0" expanded="true" />
497
+            <element signature="e#315#316#0" expanded="true" />
498
+          </folding>
499
+        </state>
500
+      </provider>
501
+    </entry>
502
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
503
+      <provider selected="true" editor-type-id="text-editor">
504
+        <state relative-caret-position="267">
505
+          <caret line="42" column="27" selection-start-line="42" selection-start-column="27" selection-end-line="42" selection-end-column="27" />
506
+          <folding>
507
+            <element signature="imports" expanded="true" />
506
           </folding>
508
           </folding>
507
         </state>
509
         </state>
508
       </provider>
510
       </provider>

+ 22
- 0
src/main/java/io/zipcoder/interfaces/Instructor.java View File

1
+package io.zipcoder.interfaces;
2
+
3
+public class Instructor extends Person implements Teacher {
4
+
5
+    public Instructor(long id, String name) {
6
+        super(id, name);
7
+    }
8
+
9
+    public Instructor(long id) {
10
+        super(id);
11
+    }
12
+
13
+    public void teach(Learner learner, double numberOfHours) {
14
+        learner.learn(numberOfHours);
15
+    }
16
+
17
+    public void lecture(Learner[] learners, double numberOfHours) {
18
+        for(int i = 0; i < learners.length; i++) {
19
+            learners[i].learn(numberOfHours / learners.length);
20
+        }
21
+    }
22
+}

+ 7
- 0
src/main/java/io/zipcoder/interfaces/Teacher.java View File

1
+package io.zipcoder.interfaces;
2
+
3
+public interface Teacher {
4
+    void teach(Learner learner, double numberOfHours);
5
+
6
+    void lecture(Learner[] learners, double numberOfHours);
7
+}

+ 50
- 0
src/test/java/io/zipcoder/interfaces/TestInstructor.java View File

1
+package io.zipcoder.interfaces;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+public class TestInstructor {
7
+
8
+    @Test
9
+    public void testImplementation(){
10
+        Instructor instructor = new Instructor(54, "Mr.Bean");
11
+        Assert.assertTrue(instructor instanceof Person);
12
+    }
13
+
14
+    @Test
15
+    public void testInheritance(){
16
+        Instructor instructor = new Instructor(54, "Mr.Bean");
17
+        Assert.assertTrue(instructor instanceof Teacher);
18
+    }
19
+
20
+    @Test
21
+    public void testTeach(){
22
+        Instructor instructor = new Instructor(54, "Mr.Bean");
23
+        Student student = new Student(1, "William");
24
+
25
+        instructor.teach(student, 2);
26
+
27
+        double expected = 2;
28
+        double actual = student.totalStudyTime;
29
+
30
+        Assert.assertEquals(expected, actual, 0);
31
+    }
32
+
33
+    @Test
34
+    public void testLecture(){
35
+        Instructor instructor = new Instructor(54, "Mr.Bean");
36
+        Student William = new Student(1, "William");
37
+        Student James = new Student(3, "James");
38
+
39
+        Learner[] learners = {William, James};
40
+
41
+        instructor.lecture(learners, 2);
42
+
43
+        double expected = 1;
44
+        double actualWilliam = William.totalStudyTime;
45
+        double actualJames = James.totalStudyTime;
46
+
47
+        Assert.assertEquals(expected, actualWilliam, 0);
48
+        Assert.assertEquals(expected, actualJames, 0);
49
+    }
50
+}