Browse Source

Completed till part5

NiraParikh 6 years ago
parent
commit
8cfde16ba5

+ 1
- 0
.idea/.name View File

@@ -0,0 +1 @@
1
+interfaces-1

+ 16
- 0
.idea/compiler.xml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <annotationProcessing>
5
+      <profile name="Maven default annotation processors profile" enabled="true">
6
+        <sourceOutputDir name="target/generated-sources/annotations" />
7
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
8
+        <outputRelativeToContentRoot value="true" />
9
+        <module name="interfaces-1" />
10
+      </profile>
11
+    </annotationProcessing>
12
+    <bytecodeTargetLevel>
13
+      <module name="interfaces-1" target="1.5" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 6
- 0
.idea/encodings.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding">
4
+    <file url="file://$PROJECT_DIR$" charset="UTF-8" />
5
+  </component>
6
+</project>

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_12.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.12">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: org.hamcrest:hamcrest-core:1.3">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/misc.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="MavenProjectsManager">
4
+    <option name="originalFiles">
5
+      <list>
6
+        <option value="$PROJECT_DIR$/pom.xml" />
7
+      </list>
8
+    </option>
9
+  </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
11
+    <output url="file://$PROJECT_DIR$/classes" />
12
+  </component>
13
+</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/interfaces-1.iml" filepath="$PROJECT_DIR$/interfaces-1.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+  </component>
6
+</project>

+ 727
- 0
.idea/workspace.xml View File

@@ -0,0 +1,727 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="ac1bf5b2-4c7f-4a95-bc39-d60020b9fb88" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" afterDir="false" />
13
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" afterDir="false" />
14
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" afterDir="false" />
15
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" afterDir="false" />
16
+      <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" />
17
+      <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" />
18
+    </list>
19
+    <ignored path="$PROJECT_DIR$/target/" />
20
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
21
+    <option name="SHOW_DIALOG" value="false" />
22
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
23
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
24
+    <option name="LAST_RESOLUTION" value="IGNORE" />
25
+  </component>
26
+  <component name="FUSProjectUsageTrigger">
27
+    <session id="929037324">
28
+      <usages-collector id="statistics.lifecycle.project">
29
+        <counts>
30
+          <entry key="project.closed" value="1" />
31
+          <entry key="project.open.time.1" value="1" />
32
+          <entry key="project.opened" value="1" />
33
+        </counts>
34
+      </usages-collector>
35
+      <usages-collector id="statistics.file.extensions.open">
36
+        <counts>
37
+          <entry key="java" value="9" />
38
+          <entry key="md" value="1" />
39
+        </counts>
40
+      </usages-collector>
41
+      <usages-collector id="statistics.file.types.open">
42
+        <counts>
43
+          <entry key="JAVA" value="9" />
44
+          <entry key="Markdown" value="1" />
45
+        </counts>
46
+      </usages-collector>
47
+      <usages-collector id="statistics.file.extensions.edit">
48
+        <counts>
49
+          <entry key="java" value="4125" />
50
+        </counts>
51
+      </usages-collector>
52
+      <usages-collector id="statistics.file.types.edit">
53
+        <counts>
54
+          <entry key="JAVA" value="4125" />
55
+        </counts>
56
+      </usages-collector>
57
+    </session>
58
+  </component>
59
+  <component name="FileEditorManager">
60
+    <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="405">
65
+              <caret line="27" selection-start-line="27" selection-end-line="27" />
66
+              <folding>
67
+                <element signature="e#235#236#0" expanded="true" />
68
+                <element signature="e#263#264#0" expanded="true" />
69
+                <element signature="e#231#232#0" expanded="true" />
70
+                <element signature="e#256#257#0" expanded="true" />
71
+                <element signature="e#292#293#0" expanded="true" />
72
+                <element signature="e#316#317#0" expanded="true" />
73
+                <element signature="e#351#352#0" expanded="true" />
74
+                <element signature="e#383#384#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/main/java/io/zipcoder/interfaces/Student.java">
82
+          <provider selected="true" editor-type-id="text-editor">
83
+            <state relative-caret-position="315">
84
+              <caret line="21" column="1" lean-forward="true" selection-start-line="21" selection-start-column="1" selection-end-line="21" selection-end-column="1" />
85
+              <folding>
86
+                <element signature="e#260#261#0" expanded="true" />
87
+                <element signature="e#289#290#0" expanded="true" />
88
+                <element signature="e#333#334#0" expanded="true" />
89
+                <element signature="e#361#362#0" expanded="true" />
90
+                <element signature="e#404#405#0" expanded="true" />
91
+                <element signature="e#451#452#0" expanded="true" />
92
+              </folding>
93
+            </state>
94
+          </provider>
95
+        </entry>
96
+      </file>
97
+      <file pinned="false" current-in-tab="false">
98
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
99
+          <provider selected="true" editor-type-id="text-editor">
100
+            <state relative-caret-position="90">
101
+              <caret line="6" column="62" selection-start-line="6" selection-start-column="62" selection-end-line="6" selection-end-column="62" />
102
+            </state>
103
+          </provider>
104
+        </entry>
105
+      </file>
106
+      <file pinned="false" current-in-tab="false">
107
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
108
+          <provider selected="true" editor-type-id="text-editor">
109
+            <state relative-caret-position="345">
110
+              <caret line="23" column="5" lean-forward="true" selection-start-line="23" selection-start-column="5" selection-end-line="23" selection-end-column="5" />
111
+              <folding>
112
+                <element signature="e#138#139#0" expanded="true" />
113
+                <element signature="e#169#170#0" expanded="true" />
114
+                <element signature="e#203#204#0" expanded="true" />
115
+                <element signature="e#228#229#0" expanded="true" />
116
+              </folding>
117
+            </state>
118
+          </provider>
119
+        </entry>
120
+      </file>
121
+      <file pinned="false" current-in-tab="true">
122
+        <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
123
+          <provider selected="true" editor-type-id="text-editor">
124
+            <state relative-caret-position="28">
125
+              <caret line="6" column="60" lean-forward="true" selection-start-line="6" selection-start-column="60" selection-end-line="6" selection-end-column="60" />
126
+              <folding>
127
+                <element signature="e#134#142#0" expanded="true" />
128
+                <element signature="e#486#487#0" expanded="true" />
129
+                <element signature="e#535#536#0" expanded="true" />
130
+              </folding>
131
+            </state>
132
+          </provider>
133
+        </entry>
134
+      </file>
135
+      <file pinned="false" current-in-tab="false">
136
+        <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
137
+          <provider selected="true" editor-type-id="text-editor">
138
+            <state relative-caret-position="403">
139
+              <caret line="47" column="96" selection-start-line="47" selection-start-column="96" selection-end-line="47" selection-end-column="96" />
140
+              <folding>
141
+                <element signature="imports" expanded="true" />
142
+                <element signature="e#164#165#0" expanded="true" />
143
+                <element signature="e#228#229#0" expanded="true" />
144
+                <element signature="e#333#334#0" expanded="true" />
145
+                <element signature="e#355#356#0" expanded="true" />
146
+              </folding>
147
+            </state>
148
+          </provider>
149
+        </entry>
150
+      </file>
151
+    </leaf>
152
+  </component>
153
+  <component name="FileTemplateManagerImpl">
154
+    <option name="RECENT_TEMPLATES">
155
+      <list>
156
+        <option value="Interface" />
157
+        <option value="Class" />
158
+      </list>
159
+    </option>
160
+  </component>
161
+  <component name="Git.Settings">
162
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
163
+  </component>
164
+  <component name="IdeDocumentHistory">
165
+    <option name="CHANGED_PATHS">
166
+      <list>
167
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" />
168
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" />
169
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" />
170
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java" />
171
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java" />
172
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" />
173
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" />
174
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java" />
175
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" />
176
+      </list>
177
+    </option>
178
+  </component>
179
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
180
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
181
+  <component name="JsGulpfileManager">
182
+    <detection-done>true</detection-done>
183
+    <sorting>DEFINITION_ORDER</sorting>
184
+  </component>
185
+  <component name="ProjectFrameBounds">
186
+    <option name="y" value="86" />
187
+    <option name="width" value="1280" />
188
+    <option name="height" value="722" />
189
+  </component>
190
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
191
+    <ConfirmationsSetting value="2" id="Add" />
192
+  </component>
193
+  <component name="ProjectView">
194
+    <navigator proportions="" version="1">
195
+      <foldersAlwaysOnTop value="true" />
196
+    </navigator>
197
+    <panes>
198
+      <pane id="PackagesPane" />
199
+      <pane id="ProjectPane">
200
+        <subPane>
201
+          <expand>
202
+            <path>
203
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
204
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
205
+            </path>
206
+            <path>
207
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
208
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
209
+              <item name="src" type="462c0819:PsiDirectoryNode" />
210
+            </path>
211
+            <path>
212
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
213
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
214
+              <item name="src" type="462c0819:PsiDirectoryNode" />
215
+              <item name="main" type="462c0819:PsiDirectoryNode" />
216
+            </path>
217
+            <path>
218
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
219
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
220
+              <item name="src" type="462c0819:PsiDirectoryNode" />
221
+              <item name="main" type="462c0819:PsiDirectoryNode" />
222
+              <item name="java" type="462c0819:PsiDirectoryNode" />
223
+            </path>
224
+            <path>
225
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
226
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
227
+              <item name="src" type="462c0819:PsiDirectoryNode" />
228
+              <item name="main" type="462c0819:PsiDirectoryNode" />
229
+              <item name="java" type="462c0819:PsiDirectoryNode" />
230
+              <item name="interfaces" type="462c0819:PsiDirectoryNode" />
231
+            </path>
232
+            <path>
233
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
234
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
235
+              <item name="src" type="462c0819:PsiDirectoryNode" />
236
+              <item name="test" type="462c0819:PsiDirectoryNode" />
237
+            </path>
238
+            <path>
239
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
240
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
241
+              <item name="src" type="462c0819:PsiDirectoryNode" />
242
+              <item name="test" type="462c0819:PsiDirectoryNode" />
243
+              <item name="java" type="462c0819:PsiDirectoryNode" />
244
+            </path>
245
+            <path>
246
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
247
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
248
+              <item name="src" type="462c0819:PsiDirectoryNode" />
249
+              <item name="test" type="462c0819:PsiDirectoryNode" />
250
+              <item name="java" type="462c0819:PsiDirectoryNode" />
251
+              <item name="interfaces" type="462c0819:PsiDirectoryNode" />
252
+            </path>
253
+          </expand>
254
+          <select />
255
+        </subPane>
256
+      </pane>
257
+      <pane id="Scope" />
258
+    </panes>
259
+  </component>
260
+  <component name="PropertiesComponent">
261
+    <property name="WebServerToolWindowFactoryState" value="false" />
262
+    <property name="aspect.path.notification.shown" value="true" />
263
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542398624266" />
264
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
265
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
266
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
267
+    <property name="project.structure.last.edited" value="Project" />
268
+    <property name="project.structure.proportion" value="0.0" />
269
+    <property name="project.structure.side.proportion" value="0.0" />
270
+  </component>
271
+  <component name="RunDashboard">
272
+    <option name="ruleStates">
273
+      <list>
274
+        <RuleState>
275
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
276
+        </RuleState>
277
+        <RuleState>
278
+          <option name="name" value="StatusDashboardGroupingRule" />
279
+        </RuleState>
280
+      </list>
281
+    </option>
282
+  </component>
283
+  <component name="RunManager" selected="JUnit.TestInstructor.testLecture">
284
+    <configuration name="TestInstructor.testImplementation" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
285
+      <module name="interfaces-1" />
286
+      <extension name="coverage">
287
+        <pattern>
288
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
289
+          <option name="ENABLED" value="true" />
290
+        </pattern>
291
+      </extension>
292
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
293
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
294
+      <option name="METHOD_NAME" value="testImplementation" />
295
+      <option name="TEST_OBJECT" value="method" />
296
+      <method v="2">
297
+        <option name="Make" enabled="true" />
298
+      </method>
299
+    </configuration>
300
+    <configuration name="TestInstructor.testInheritance" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
301
+      <module name="interfaces-1" />
302
+      <extension name="coverage">
303
+        <pattern>
304
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
305
+          <option name="ENABLED" value="true" />
306
+        </pattern>
307
+      </extension>
308
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
309
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
310
+      <option name="METHOD_NAME" value="testInheritance" />
311
+      <option name="TEST_OBJECT" value="method" />
312
+      <method v="2">
313
+        <option name="Make" enabled="true" />
314
+      </method>
315
+    </configuration>
316
+    <configuration name="TestInstructor.testLecture" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
317
+      <module name="interfaces-1" />
318
+      <extension name="coverage">
319
+        <pattern>
320
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
321
+          <option name="ENABLED" value="true" />
322
+        </pattern>
323
+      </extension>
324
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
325
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
326
+      <option name="METHOD_NAME" value="testLecture" />
327
+      <option name="TEST_OBJECT" value="method" />
328
+      <method v="2">
329
+        <option name="Make" enabled="true" />
330
+      </method>
331
+    </configuration>
332
+    <configuration name="TestInstructor.testTeach" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
333
+      <module name="interfaces-1" />
334
+      <extension name="coverage">
335
+        <pattern>
336
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
337
+          <option name="ENABLED" value="true" />
338
+        </pattern>
339
+      </extension>
340
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
341
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestInstructor" />
342
+      <option name="METHOD_NAME" value="testTeach" />
343
+      <option name="TEST_OBJECT" value="method" />
344
+      <method v="2">
345
+        <option name="Make" enabled="true" />
346
+      </method>
347
+    </configuration>
348
+    <configuration name="TestPerson" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
349
+      <module name="interfaces-1" />
350
+      <extension name="coverage">
351
+        <pattern>
352
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
353
+          <option name="ENABLED" value="true" />
354
+        </pattern>
355
+      </extension>
356
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
357
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.TestPerson" />
358
+      <method v="2">
359
+        <option name="Make" enabled="true" />
360
+      </method>
361
+    </configuration>
362
+    <configuration default="true" type="tests" factoryName="Nosetests">
363
+      <option name="INTERPRETER_OPTIONS" value="" />
364
+      <option name="PARENT_ENVS" value="true" />
365
+      <option name="SDK_HOME" value="" />
366
+      <option name="WORKING_DIRECTORY" value="" />
367
+      <option name="IS_MODULE_SDK" value="false" />
368
+      <option name="ADD_CONTENT_ROOTS" value="true" />
369
+      <option name="ADD_SOURCE_ROOTS" value="true" />
370
+      <module name="" />
371
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
372
+      <option name="_new_regexPattern" value="&quot;&quot;" />
373
+      <option name="_new_additionalArguments" value="&quot;&quot;" />
374
+      <option name="_new_target" value="&quot;&quot;" />
375
+      <option name="_new_targetType" value="&quot;PATH&quot;" />
376
+      <method v="2" />
377
+    </configuration>
378
+    <configuration default="true" type="tests" factoryName="Twisted Trial">
379
+      <option name="INTERPRETER_OPTIONS" value="" />
380
+      <option name="PARENT_ENVS" value="true" />
381
+      <option name="SDK_HOME" value="" />
382
+      <option name="WORKING_DIRECTORY" value="" />
383
+      <option name="IS_MODULE_SDK" value="false" />
384
+      <option name="ADD_CONTENT_ROOTS" value="true" />
385
+      <option name="ADD_SOURCE_ROOTS" value="true" />
386
+      <module name="" />
387
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
388
+      <option name="_new_additionalArguments" value="&quot;&quot;" />
389
+      <option name="_new_target" value="&quot;&quot;" />
390
+      <option name="_new_targetType" value="&quot;PATH&quot;" />
391
+      <method v="2" />
392
+    </configuration>
393
+    <configuration default="true" type="tests" factoryName="Unittests">
394
+      <option name="INTERPRETER_OPTIONS" value="" />
395
+      <option name="PARENT_ENVS" value="true" />
396
+      <option name="SDK_HOME" value="" />
397
+      <option name="WORKING_DIRECTORY" value="" />
398
+      <option name="IS_MODULE_SDK" value="false" />
399
+      <option name="ADD_CONTENT_ROOTS" value="true" />
400
+      <option name="ADD_SOURCE_ROOTS" value="true" />
401
+      <module name="" />
402
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
403
+      <option name="_new_additionalArguments" value="&quot;&quot;" />
404
+      <option name="_new_target" value="&quot;&quot;" />
405
+      <option name="_new_targetType" value="&quot;PATH&quot;" />
406
+      <method v="2" />
407
+    </configuration>
408
+    <configuration default="true" type="tests" factoryName="py.test">
409
+      <option name="INTERPRETER_OPTIONS" value="" />
410
+      <option name="PARENT_ENVS" value="true" />
411
+      <option name="SDK_HOME" value="" />
412
+      <option name="WORKING_DIRECTORY" value="" />
413
+      <option name="IS_MODULE_SDK" value="false" />
414
+      <option name="ADD_CONTENT_ROOTS" value="true" />
415
+      <option name="ADD_SOURCE_ROOTS" value="true" />
416
+      <module name="" />
417
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
418
+      <option name="_new_keywords" value="&quot;&quot;" />
419
+      <option name="_new_additionalArguments" value="&quot;&quot;" />
420
+      <option name="_new_target" value="&quot;&quot;" />
421
+      <option name="_new_targetType" value="&quot;PATH&quot;" />
422
+      <method v="2" />
423
+    </configuration>
424
+    <list>
425
+      <item itemvalue="JUnit.TestPerson" />
426
+      <item itemvalue="JUnit.TestInstructor.testImplementation" />
427
+      <item itemvalue="JUnit.TestInstructor.testTeach" />
428
+      <item itemvalue="JUnit.TestInstructor.testInheritance" />
429
+      <item itemvalue="JUnit.TestInstructor.testLecture" />
430
+    </list>
431
+    <recent_temporary>
432
+      <list>
433
+        <item itemvalue="JUnit.TestInstructor.testLecture" />
434
+        <item itemvalue="JUnit.TestInstructor.testInheritance" />
435
+        <item itemvalue="JUnit.TestInstructor.testImplementation" />
436
+        <item itemvalue="JUnit.TestInstructor.testTeach" />
437
+        <item itemvalue="JUnit.TestPerson" />
438
+      </list>
439
+    </recent_temporary>
440
+  </component>
441
+  <component name="SvnConfiguration">
442
+    <configuration />
443
+  </component>
444
+  <component name="TaskManager">
445
+    <task active="true" id="Default" summary="Default task">
446
+      <changelist id="ac1bf5b2-4c7f-4a95-bc39-d60020b9fb88" name="Default Changelist" comment="" />
447
+      <created>1542340589455</created>
448
+      <option name="number" value="Default" />
449
+      <option name="presentableId" value="Default" />
450
+      <updated>1542340589455</updated>
451
+      <workItem from="1542340590829" duration="14354000" />
452
+    </task>
453
+    <servers />
454
+  </component>
455
+  <component name="TestHistory">
456
+    <history-entry file="TestStudent_testLearn - 2018.11.16 at 09h 26m 16s.xml">
457
+      <configuration name="TestStudent.testLearn" configurationId="JUnit" />
458
+    </history-entry>
459
+    <history-entry file="TestStudent - 2018.11.16 at 09h 27m 35s.xml">
460
+      <configuration name="TestStudent" configurationId="JUnit" />
461
+    </history-entry>
462
+    <history-entry file="TestStudent - 2018.11.16 at 09h 27m 45s.xml">
463
+      <configuration name="TestStudent" configurationId="JUnit" />
464
+    </history-entry>
465
+    <history-entry file="TestPerson - 2018.11.16 at 09h 27m 52s.xml">
466
+      <configuration name="TestPerson" configurationId="JUnit" />
467
+    </history-entry>
468
+    <history-entry file="TestInstructor_testTeach - 2018.11.16 at 11h 46m 59s.xml">
469
+      <configuration name="TestInstructor.testTeach" configurationId="JUnit" />
470
+    </history-entry>
471
+    <history-entry file="TestInstructor_testImplementation - 2018.11.16 at 11h 47m 06s.xml">
472
+      <configuration name="TestInstructor.testImplementation" configurationId="JUnit" />
473
+    </history-entry>
474
+    <history-entry file="TestInstructor_testInheritance - 2018.11.16 at 11h 47m 09s.xml">
475
+      <configuration name="TestInstructor.testInheritance" configurationId="JUnit" />
476
+    </history-entry>
477
+    <history-entry file="TestInstructor_testLecture - 2018.11.16 at 11h 48m 34s.xml">
478
+      <configuration name="TestInstructor.testLecture" configurationId="JUnit" />
479
+    </history-entry>
480
+    <history-entry file="TestInstructor_testLecture - 2018.11.16 at 12h 13m 14s.xml">
481
+      <configuration name="TestInstructor.testLecture" configurationId="JUnit" />
482
+    </history-entry>
483
+    <history-entry file="TestInstructor_testLecture - 2018.11.16 at 12h 13m 29s.xml">
484
+      <configuration name="TestInstructor.testLecture" configurationId="JUnit" />
485
+    </history-entry>
486
+  </component>
487
+  <component name="TimeTrackingManager">
488
+    <option name="totallyTimeSpent" value="14354000" />
489
+  </component>
490
+  <component name="ToolWindowManager">
491
+    <frame x="0" y="86" width="1280" height="722" extended-state="0" />
492
+    <editor active="true" />
493
+    <layout>
494
+      <window_info id="Image Layers" />
495
+      <window_info id="Designer" />
496
+      <window_info id="UI Designer" />
497
+      <window_info id="Capture Tool" />
498
+      <window_info id="Favorites" side_tool="true" />
499
+      <window_info content_ui="combo" id="Project" order="0" weight="0.24959612" />
500
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
501
+      <window_info anchor="bottom" id="Messages" weight="0.32857144" />
502
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
503
+      <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
504
+      <window_info anchor="bottom" id="Terminal" />
505
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
506
+      <window_info anchor="bottom" id="Message" order="0" />
507
+      <window_info anchor="bottom" id="Find" order="1" />
508
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32857144" />
509
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
510
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
511
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
512
+      <window_info anchor="bottom" id="TODO" order="6" />
513
+      <window_info anchor="right" id="Palette" />
514
+      <window_info anchor="right" id="Theme Preview" />
515
+      <window_info anchor="right" id="Capture Analysis" />
516
+      <window_info anchor="right" id="Palette&#9;" />
517
+      <window_info anchor="right" id="SciView" />
518
+      <window_info anchor="right" id="Database" />
519
+      <window_info anchor="right" id="Maven Projects" />
520
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
521
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
522
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
523
+    </layout>
524
+    <layout-to-restore>
525
+      <window_info id="Image Layers" order="0" />
526
+      <window_info id="Designer" order="1" />
527
+      <window_info id="UI Designer" order="2" />
528
+      <window_info id="Capture Tool" order="3" />
529
+      <window_info id="Favorites" order="4" side_tool="true" />
530
+      <window_info active="true" content_ui="combo" id="Project" order="5" visible="true" weight="0.24959612" />
531
+      <window_info id="Structure" order="6" side_tool="true" weight="0.25" />
532
+      <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
533
+      <window_info anchor="bottom" id="Terminal" order="1" />
534
+      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
535
+      <window_info anchor="bottom" id="Database Changes" order="3" show_stripe_button="false" />
536
+      <window_info anchor="bottom" id="Messages" order="4" weight="0.32857144" />
537
+      <window_info anchor="bottom" id="Message" order="5" />
538
+      <window_info anchor="bottom" id="Find" order="6" />
539
+      <window_info anchor="bottom" id="Run" order="7" visible="true" weight="0.32857144" />
540
+      <window_info anchor="bottom" id="Debug" order="8" weight="0.4" />
541
+      <window_info anchor="bottom" id="Cvs" order="9" weight="0.25" />
542
+      <window_info anchor="bottom" id="Inspection" order="10" weight="0.4" />
543
+      <window_info anchor="bottom" id="TODO" order="11" />
544
+      <window_info anchor="right" id="Palette" order="0" />
545
+      <window_info anchor="right" id="Capture Analysis" order="1" />
546
+      <window_info anchor="right" id="Database" order="2" />
547
+      <window_info anchor="right" id="Theme Preview" order="3" />
548
+      <window_info anchor="right" id="Palette&#9;" order="4" />
549
+      <window_info anchor="right" id="SciView" order="5" />
550
+      <window_info anchor="right" id="Maven Projects" order="6" />
551
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="7" type="SLIDING" weight="0.4" />
552
+      <window_info anchor="right" id="Ant Build" order="8" weight="0.25" />
553
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="9" weight="0.25" />
554
+    </layout-to-restore>
555
+  </component>
556
+  <component name="TypeScriptGeneratedFilesManager">
557
+    <option name="version" value="1" />
558
+  </component>
559
+  <component name="VcsContentAnnotationSettings">
560
+    <option name="myLimit" value="2678400000" />
561
+  </component>
562
+  <component name="editorHistoryManager">
563
+    <entry file="file://$PROJECT_DIR$/README.md">
564
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
565
+        <state split_layout="SECOND">
566
+          <first_editor />
567
+          <second_editor />
568
+        </state>
569
+      </provider>
570
+    </entry>
571
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java">
572
+      <provider selected="true" editor-type-id="text-editor">
573
+        <state relative-caret-position="30">
574
+          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
575
+        </state>
576
+      </provider>
577
+    </entry>
578
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java">
579
+      <provider selected="true" editor-type-id="text-editor">
580
+        <state relative-caret-position="150">
581
+          <caret line="10" column="9" lean-forward="true" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
582
+          <folding>
583
+            <element signature="imports" expanded="true" />
584
+          </folding>
585
+        </state>
586
+      </provider>
587
+    </entry>
588
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestStudent.java">
589
+      <provider selected="true" editor-type-id="text-editor">
590
+        <state relative-caret-position="167">
591
+          <caret line="20" column="54" lean-forward="true" selection-start-line="20" selection-start-column="54" selection-end-line="20" selection-end-column="54" />
592
+          <folding>
593
+            <element signature="imports" expanded="true" />
594
+          </folding>
595
+        </state>
596
+      </provider>
597
+    </entry>
598
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Person.java">
599
+      <provider selected="true" editor-type-id="text-editor">
600
+        <state relative-caret-position="405">
601
+          <caret line="27" selection-start-line="27" selection-end-line="27" />
602
+          <folding>
603
+            <element signature="e#235#236#0" expanded="true" />
604
+            <element signature="e#263#264#0" expanded="true" />
605
+            <element signature="e#231#232#0" expanded="true" />
606
+            <element signature="e#256#257#0" expanded="true" />
607
+            <element signature="e#292#293#0" expanded="true" />
608
+            <element signature="e#316#317#0" expanded="true" />
609
+            <element signature="e#351#352#0" expanded="true" />
610
+            <element signature="e#383#384#0" expanded="true" />
611
+          </folding>
612
+        </state>
613
+      </provider>
614
+    </entry>
615
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
616
+      <provider selected="true" editor-type-id="text-editor">
617
+        <state relative-caret-position="315">
618
+          <caret line="21" column="1" lean-forward="true" selection-start-line="21" selection-start-column="1" selection-end-line="21" selection-end-column="1" />
619
+          <folding>
620
+            <element signature="e#260#261#0" expanded="true" />
621
+            <element signature="e#289#290#0" expanded="true" />
622
+            <element signature="e#333#334#0" expanded="true" />
623
+            <element signature="e#361#362#0" expanded="true" />
624
+            <element signature="e#404#405#0" expanded="true" />
625
+            <element signature="e#451#452#0" expanded="true" />
626
+          </folding>
627
+        </state>
628
+      </provider>
629
+    </entry>
630
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java">
631
+      <provider selected="true" editor-type-id="text-editor">
632
+        <state relative-caret-position="90">
633
+          <caret line="6" column="62" selection-start-line="6" selection-start-column="62" selection-end-line="6" selection-end-column="62" />
634
+        </state>
635
+      </provider>
636
+    </entry>
637
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestInstructor.java">
638
+      <provider selected="true" editor-type-id="text-editor">
639
+        <state relative-caret-position="403">
640
+          <caret line="47" column="96" selection-start-line="47" selection-start-column="96" selection-end-line="47" selection-end-column="96" />
641
+          <folding>
642
+            <element signature="imports" expanded="true" />
643
+            <element signature="e#164#165#0" expanded="true" />
644
+            <element signature="e#228#229#0" expanded="true" />
645
+            <element signature="e#333#334#0" expanded="true" />
646
+            <element signature="e#355#356#0" expanded="true" />
647
+          </folding>
648
+        </state>
649
+      </provider>
650
+    </entry>
651
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
652
+      <provider selected="true" editor-type-id="text-editor">
653
+        <state relative-caret-position="345">
654
+          <caret line="23" column="5" lean-forward="true" selection-start-line="23" selection-start-column="5" selection-end-line="23" selection-end-column="5" />
655
+          <folding>
656
+            <element signature="e#138#139#0" expanded="true" />
657
+            <element signature="e#169#170#0" expanded="true" />
658
+            <element signature="e#203#204#0" expanded="true" />
659
+            <element signature="e#228#229#0" expanded="true" />
660
+          </folding>
661
+        </state>
662
+      </provider>
663
+    </entry>
664
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
665
+      <provider selected="true" editor-type-id="text-editor">
666
+        <state relative-caret-position="28">
667
+          <caret line="6" column="60" lean-forward="true" selection-start-line="6" selection-start-column="60" selection-end-line="6" selection-end-column="60" />
668
+          <folding>
669
+            <element signature="e#134#142#0" expanded="true" />
670
+            <element signature="e#486#487#0" expanded="true" />
671
+            <element signature="e#535#536#0" expanded="true" />
672
+          </folding>
673
+        </state>
674
+      </provider>
675
+    </entry>
676
+  </component>
677
+  <component name="masterDetails">
678
+    <states>
679
+      <state key="GlobalLibrariesConfigurable.UI">
680
+        <settings>
681
+          <splitter-proportions>
682
+            <option name="proportions">
683
+              <list>
684
+                <option value="0.2" />
685
+              </list>
686
+            </option>
687
+          </splitter-proportions>
688
+        </settings>
689
+      </state>
690
+      <state key="JdkListConfigurable.UI">
691
+        <settings>
692
+          <last-edited>1.8</last-edited>
693
+          <splitter-proportions>
694
+            <option name="proportions">
695
+              <list>
696
+                <option value="0.2" />
697
+              </list>
698
+            </option>
699
+          </splitter-proportions>
700
+        </settings>
701
+      </state>
702
+      <state key="ProjectJDKs.UI">
703
+        <settings>
704
+          <last-edited>1.8</last-edited>
705
+          <splitter-proportions>
706
+            <option name="proportions">
707
+              <list>
708
+                <option value="0.2" />
709
+              </list>
710
+            </option>
711
+          </splitter-proportions>
712
+        </settings>
713
+      </state>
714
+      <state key="ProjectLibrariesConfigurable.UI">
715
+        <settings>
716
+          <splitter-proportions>
717
+            <option name="proportions">
718
+              <list>
719
+                <option value="0.2" />
720
+              </list>
721
+            </option>
722
+          </splitter-proportions>
723
+        </settings>
724
+      </state>
725
+    </states>
726
+  </component>
727
+</project>

+ 16
- 0
interfaces-1.iml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
4
+    <output url="file://$MODULE_DIR$/target/classes" />
5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
+    <content url="file://$MODULE_DIR$">
7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
9
+      <excludeFolder url="file://$MODULE_DIR$/target" />
10
+    </content>
11
+    <orderEntry type="inheritedJdk" />
12
+    <orderEntry type="sourceFolder" forTests="false" />
13
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
14
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
15
+  </component>
16
+</module>

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

@@ -0,0 +1,25 @@
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 numOfHrs) {
14
+        learner.learn(numOfHrs);
15
+
16
+    }
17
+
18
+    public void lecture(Learner[] learners, double numOfHrs) {
19
+        double numOfHrsPerLearner = numOfHrs/learners.length;
20
+
21
+        for(Learner learner : learners){
22
+            learner.learn(numOfHrsPerLearner);
23
+        }
24
+    }
25
+}

+ 5
- 0
src/main/java/io/zipcoder/interfaces/Learner.java View File

@@ -0,0 +1,5 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public interface Learner {
4
+    void learn(double numOfHrs);
5
+}

+ 38
- 0
src/main/java/io/zipcoder/interfaces/People.java View File

@@ -0,0 +1,38 @@
1
+package io.zipcoder.interfaces;
2
+
3
+import java.util.ArrayList;
4
+
5
+public class People {
6
+
7
+    ArrayList <Person> personList = new ArrayList<Person>();
8
+
9
+    public void add(Person p){
10
+        personList.add(p);
11
+        //or
12
+        //this.personList.add(p)
13
+    }
14
+
15
+//    public long findById(long id){
16
+//
17
+//        personList.getId(id);
18
+////
19
+//        for (Person p : personList){
20
+//            if (p.getId() == id){
21
+//                return p;
22
+// }
23
+
24
+    public void remove(Person person){
25
+            personList.remove(person);
26
+        }
27
+    public void remove (Long id){
28
+        for (Person p : personList){
29
+            if (p.getId() == id){
30
+                personList.remove(p);
31
+            }
32
+        }
33
+    }
34
+
35
+    public void removeAll(){
36
+
37
+    }
38
+}

+ 24
- 0
src/main/java/io/zipcoder/interfaces/Person.java View File

@@ -2,4 +2,28 @@ package io.zipcoder.interfaces;
2 2
 
3 3
 public class Person {
4 4
 
5
+    public final long id;
6
+    public String name;
7
+
8
+    public Person (long id, String name){
9
+        this.id = id;
10
+        this.name = name;
11
+    }
12
+
13
+
14
+    public Person(long id){
15
+        this.id = id;
16
+    }
17
+    public long getId(){
18
+        return id;
19
+    }
20
+
21
+    public String getName(){
22
+        return name;
23
+    }
24
+
25
+    public void setName(String name){
26
+        this.name = name;
27
+    }
28
+
5 29
 }

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

@@ -0,0 +1,22 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class Student extends Person implements Learner {
4
+double totalStudyTime;
5
+
6
+public Student (long id, String name){
7
+    super(id, name);
8
+    this.totalStudyTime = 0;
9
+}
10
+
11
+public void learn (double mumOfHours){
12
+    totalStudyTime += mumOfHours;
13
+}
14
+
15
+public double getTotalStudyTime(){
16
+    return totalStudyTime;
17
+}
18
+
19
+    public void setTotalStudyTime(double totalStudyTime) {
20
+    this.totalStudyTime = totalStudyTime;
21
+    }
22
+}

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

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

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

@@ -0,0 +1,53 @@
1
+package io.zipcoder.interfaces;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+public class TestInstructor {
7
+
8
+    Instructor instructor = new Instructor(1, "Nhu");
9
+    Student student = new Student(1, "Nancy");
10
+    Student student1= new Student(2, "Ron");
11
+    Student student2= new Student(3, "Ari");
12
+    Student student3= new Student(4, "Rita");
13
+
14
+    Student [] students = new Student[] {student,student1,student2,student3};
15
+
16
+
17
+    @Test
18
+    public void testImplementation(){
19
+        Assert.assertTrue(instructor instanceof Teacher);
20
+    }
21
+
22
+    @Test
23
+    public void testInheritance(){
24
+        Assert.assertTrue(instructor instanceof Person);
25
+    }
26
+
27
+    @Test
28
+    public void testTeach(){
29
+        student.setTotalStudyTime(2.0);
30
+        instructor.teach(student,50.0);
31
+
32
+        double expected = 52.0;
33
+
34
+       /* double actual = student.getTotalStudyTime();
35
+        Assert.assertEquals(expected,actual,0.0);*/
36
+
37
+        Assert.assertEquals(expected, student.getTotalStudyTime(), 0.0);
38
+    }
39
+
40
+    @Test
41
+    public void testLecture(){
42
+
43
+        //double numOfHrs = 50;
44
+
45
+        instructor.lecture(students, 50.0);
46
+        double expected = students[0].getTotalStudyTime();
47
+
48
+       double actual = 12.5; // numOfHrs instructor taught / # of students taught so 50/4 = 12.5
49
+
50
+
51
+        Assert.assertEquals(expected, actual, 0.0);
52
+    }
53
+}

+ 23
- 0
src/test/java/io/zipcoder/interfaces/TestPerson.java View File

@@ -1,5 +1,28 @@
1 1
 package io.zipcoder.interfaces;
2 2
 
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+
3 7
 public class TestPerson {
4 8
 
9
+    Person person = new Person(1, "Nancy");
10
+
11
+    @Test
12
+    public void testConstructor() {
13
+        long expected = 1;
14
+        long actual = person.getId();
15
+        Assert.assertEquals(expected,actual);
16
+    }
17
+
18
+    @Test
19
+    public void testSetAndGetName() {
20
+
21
+        String expected = "Robin";
22
+        person.setName(expected);
23
+
24
+
25
+        Assert.assertEquals(expected, person.getName());
26
+
27
+    }
5 28
 }

+ 46
- 0
src/test/java/io/zipcoder/interfaces/TestStudent.java View File

@@ -0,0 +1,46 @@
1
+package io.zipcoder.interfaces;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+public class TestStudent {
7
+    Student student = new Student(1, "Nancy");  //creating global new object
8
+
9
+    @Test
10
+    public void testImplementation() {
11
+/*
12
+        //Given
13
+        boolean expected = true;
14
+
15
+        //When
16
+        boolean actual = student instanceof Learner;
17
+
18
+        //Then
19
+        Assert.assertEquals(expected, actual);*/
20
+
21
+        Assert.assertTrue(student instanceof Learner);
22
+
23
+    }
24
+
25
+    @Test
26
+    public void testInheritance (){
27
+
28
+    Assert.assertTrue(student instanceof Person);
29
+    }
30
+
31
+    @Test
32
+    public void testLearn(){
33
+
34
+        //Given
35
+
36
+        double numOfHrs = 10.0;
37
+        double expected = 10.0;
38
+
39
+        //When
40
+        student.learn(numOfHrs);
41
+
42
+        //Then
43
+        Assert.assertEquals(expected,student.getTotalStudyTime(), 0.0);
44
+    }
45
+}
46
+