Chaitali Patel 6 vuotta sitten
vanhempi
commit
39c6b4340d
30 muutettua tiedostoa jossa 848 lisäystä ja 5 poistoa
  1. 1
    0
      .idea/.name
  2. 6
    0
      .idea/codeStyles/Project.xml
  3. 5
    0
      .idea/codeStyles/codeStyleConfig.xml
  4. 16
    0
      .idea/compiler.xml
  5. 3
    0
      .idea/dictionaries/chaitalipatel.xml
  6. 6
    0
      .idea/encodings.xml
  7. 13
    0
      .idea/libraries/Maven__junit_junit_4_12.xml
  8. 13
    0
      .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
  9. 13
    0
      .idea/misc.xml
  10. 8
    0
      .idea/modules.xml
  11. 6
    0
      .idea/vcs.xml
  12. 667
    0
      .idea/workspace.xml
  13. 16
    0
      interfaces-1.iml
  14. 1
    0
      src/main/java/io/zipcoder/interfaces/Instructor.java
  15. 1
    0
      src/main/java/io/zipcoder/interfaces/Instructors.java
  16. 1
    0
      src/main/java/io/zipcoder/interfaces/Learner.java
  17. 1
    0
      src/main/java/io/zipcoder/interfaces/People.java
  18. 26
    0
      src/main/java/io/zipcoder/interfaces/Person.java
  19. 1
    0
      src/main/java/io/zipcoder/interfaces/Student.java
  20. 1
    0
      src/main/java/io/zipcoder/interfaces/Students.java
  21. 1
    0
      src/main/java/io/zipcoder/interfaces/Teacher.java
  22. 1
    0
      src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java
  23. 1
    0
      src/test/java/InstructorTest.java
  24. 1
    0
      src/test/java/io/zipcoder/interfaces/InstructorsTest.java
  25. 1
    0
      src/test/java/io/zipcoder/interfaces/PeopleTest.java
  26. 35
    0
      src/test/java/io/zipcoder/interfaces/PersonTest.java
  27. 1
    0
      src/test/java/io/zipcoder/interfaces/StudentTest.java
  28. 1
    0
      src/test/java/io/zipcoder/interfaces/StudentsTest.java
  29. 0
    5
      src/test/java/io/zipcoder/interfaces/TestPerson.java
  30. 1
    0
      src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java

+ 1
- 0
.idea/.name Näytä tiedosto

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

+ 6
- 0
.idea/codeStyles/Project.xml Näytä tiedosto

@@ -0,0 +1,6 @@
1
+<component name="ProjectCodeStyleConfiguration">
2
+  <code_scheme name="Project" version="173">
3
+    <option name="LINE_SEPARATOR" value="&#13;" />
4
+    <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
5
+  </code_scheme>
6
+</component>

+ 5
- 0
.idea/codeStyles/codeStyleConfig.xml Näytä tiedosto

@@ -0,0 +1,5 @@
1
+<component name="ProjectCodeStyleConfiguration">
2
+  <state>
3
+    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+  </state>
5
+</component>

+ 16
- 0
.idea/compiler.xml Näytä tiedosto

@@ -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>

+ 3
- 0
.idea/dictionaries/chaitalipatel.xml Näytä tiedosto

@@ -0,0 +1,3 @@
1
+<component name="ProjectDictionaryState">
2
+  <dictionary name="chaitalipatel" />
3
+</component>

+ 6
- 0
.idea/encodings.xml Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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>

+ 667
- 0
.idea/workspace.xml Näytä tiedosto

@@ -0,0 +1,667 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="8138bc5d-6db1-47c1-b508-e0c3ac4388d2" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/dictionaries/chaitalipatel.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
13
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
14
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
15
+      <change afterPath="$PROJECT_DIR$/interfaces-1.iml" afterDir="false" />
16
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java" afterDir="false" />
17
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" afterDir="false" />
18
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Learner.java" afterDir="false" />
19
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java" afterDir="false" />
20
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java" afterDir="false" />
21
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java" afterDir="false" />
22
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Teacher.java" afterDir="false" />
23
+      <change afterPath="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" afterDir="false" />
24
+      <change afterPath="$PROJECT_DIR$/src/test/java/InstructorTest.java" afterDir="false" />
25
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/InstructorsTest.java" afterDir="false" />
26
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/PeopleTest.java" afterDir="false" />
27
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/PersonTest.java" afterDir="false" />
28
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentTest.java" afterDir="false" />
29
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentsTest.java" afterDir="false" />
30
+      <change afterPath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java" afterDir="false" />
31
+      <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" />
32
+      <change beforePath="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/TestPerson.java" beforeDir="false" />
33
+    </list>
34
+    <ignored path="$PROJECT_DIR$/target/" />
35
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
36
+    <option name="SHOW_DIALOG" value="false" />
37
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
38
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
39
+    <option name="LAST_RESOLUTION" value="IGNORE" />
40
+  </component>
41
+  <component name="FUSProjectUsageTrigger">
42
+    <session id="868334394">
43
+      <usages-collector id="statistics.lifecycle.project">
44
+        <counts>
45
+          <entry key="project.open.time.2" value="1" />
46
+          <entry key="project.opened" value="1" />
47
+        </counts>
48
+      </usages-collector>
49
+      <usages-collector id="statistics.file.extensions.open">
50
+        <counts>
51
+          <entry key="class" value="1" />
52
+          <entry key="java" value="14" />
53
+        </counts>
54
+      </usages-collector>
55
+      <usages-collector id="statistics.file.types.open">
56
+        <counts>
57
+          <entry key="CLASS" value="1" />
58
+          <entry key="JAVA" value="14" />
59
+        </counts>
60
+      </usages-collector>
61
+      <usages-collector id="statistics.file.extensions.edit">
62
+        <counts>
63
+          <entry key="java" value="443" />
64
+        </counts>
65
+      </usages-collector>
66
+      <usages-collector id="statistics.file.types.edit">
67
+        <counts>
68
+          <entry key="JAVA" value="443" />
69
+        </counts>
70
+      </usages-collector>
71
+    </session>
72
+  </component>
73
+  <component name="FileEditorManager">
74
+    <splitter split-orientation="horizontal" split-proportion="0.5">
75
+      <split-first>
76
+        <leaf>
77
+          <file pinned="false" current-in-tab="false">
78
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
79
+              <provider selected="true" editor-type-id="text-editor">
80
+                <state relative-caret-position="30">
81
+                  <caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
82
+                </state>
83
+              </provider>
84
+            </entry>
85
+          </file>
86
+          <file pinned="false" current-in-tab="false">
87
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
88
+              <provider selected="true" editor-type-id="text-editor">
89
+                <state relative-caret-position="75">
90
+                  <caret line="5" column="60" lean-forward="true" selection-start-line="5" selection-start-column="4" selection-end-line="5" selection-end-column="60" />
91
+                  <folding>
92
+                    <element signature="e#2497#2498#0" expanded="true" />
93
+                    <element signature="e#2528#2529#0" expanded="true" />
94
+                  </folding>
95
+                </state>
96
+              </provider>
97
+            </entry>
98
+          </file>
99
+          <file pinned="false" current-in-tab="false">
100
+            <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/InstructorsTest.java">
101
+              <provider selected="true" editor-type-id="text-editor">
102
+                <state relative-caret-position="345">
103
+                  <caret line="26" column="1" lean-forward="true" selection-start-line="26" selection-start-column="1" selection-end-line="26" selection-end-column="1" />
104
+                </state>
105
+              </provider>
106
+            </entry>
107
+          </file>
108
+          <file pinned="false" current-in-tab="false">
109
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java">
110
+              <provider selected="true" editor-type-id="text-editor">
111
+                <state relative-caret-position="390">
112
+                  <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
113
+                  <folding>
114
+                    <element signature="e#242#243#0" expanded="true" />
115
+                    <element signature="e#276#277#0" expanded="true" />
116
+                    <element signature="e#691#692#0" expanded="true" />
117
+                    <element signature="e#722#723#0" expanded="true" />
118
+                    <element signature="e#772#773#0" expanded="true" />
119
+                    <element signature="e#806#807#0" expanded="true" />
120
+                  </folding>
121
+                </state>
122
+              </provider>
123
+            </entry>
124
+          </file>
125
+          <file pinned="false" current-in-tab="true">
126
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
127
+              <provider selected="true" editor-type-id="text-editor">
128
+                <state relative-caret-position="45">
129
+                  <caret line="3" column="43" lean-forward="true" selection-start-line="3" selection-start-column="43" selection-end-line="3" selection-end-column="43" />
130
+                  <folding>
131
+                    <element signature="e#137#138#0" expanded="true" />
132
+                    <element signature="e#168#169#0" expanded="true" />
133
+                    <element signature="e#202#203#0" expanded="true" />
134
+                    <element signature="e#227#228#0" expanded="true" />
135
+                    <element signature="e#291#292#0" expanded="true" />
136
+                    <element signature="e#335#336#0" expanded="true" />
137
+                  </folding>
138
+                </state>
139
+              </provider>
140
+            </entry>
141
+          </file>
142
+          <file pinned="false" current-in-tab="false">
143
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
144
+              <provider selected="true" editor-type-id="text-editor">
145
+                <state relative-caret-position="264">
146
+                  <caret line="24" column="41" lean-forward="true" selection-start-line="24" selection-start-column="41" selection-end-line="24" selection-end-column="41" />
147
+                  <folding>
148
+                    <element signature="e#198#199#0" expanded="true" />
149
+                    <element signature="e#242#243#0" expanded="true" />
150
+                    <element signature="e#809#810#0" expanded="true" />
151
+                    <element signature="e#856#857#0" expanded="true" />
152
+                  </folding>
153
+                </state>
154
+              </provider>
155
+            </entry>
156
+          </file>
157
+        </leaf>
158
+      </split-first>
159
+      <split-second>
160
+        <leaf>
161
+          <file pinned="false" current-in-tab="true">
162
+            <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java">
163
+              <provider selected="true" editor-type-id="text-editor">
164
+                <state relative-caret-position="234">
165
+                  <caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
166
+                  <folding>
167
+                    <element signature="imports" expanded="true" />
168
+                  </folding>
169
+                </state>
170
+              </provider>
171
+            </entry>
172
+          </file>
173
+          <file pinned="false" current-in-tab="false">
174
+            <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java">
175
+              <provider selected="true" editor-type-id="text-editor">
176
+                <state relative-caret-position="315">
177
+                  <caret line="21" column="26" lean-forward="true" selection-start-line="21" selection-start-column="26" selection-end-line="21" selection-end-column="26" />
178
+                  <folding>
179
+                    <element signature="e#196#197#0" expanded="true" />
180
+                    <element signature="e#230#231#0" expanded="true" />
181
+                  </folding>
182
+                </state>
183
+              </provider>
184
+            </entry>
185
+          </file>
186
+          <file pinned="false" current-in-tab="false">
187
+            <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentsTest.java">
188
+              <provider selected="true" editor-type-id="text-editor">
189
+                <state relative-caret-position="15">
190
+                  <caret line="1" lean-forward="true" selection-start-line="1" selection-end-line="1" />
191
+                </state>
192
+              </provider>
193
+            </entry>
194
+          </file>
195
+        </leaf>
196
+      </split-second>
197
+    </splitter>
198
+  </component>
199
+  <component name="FindInProjectRecents">
200
+    <findStrings>
201
+      <find>studs</find>
202
+    </findStrings>
203
+    <replaceStrings>
204
+      <replace>Instructor</replace>
205
+      <replace>instructor</replace>
206
+    </replaceStrings>
207
+  </component>
208
+  <component name="Git.Settings">
209
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
210
+  </component>
211
+  <component name="IdeDocumentHistory">
212
+    <option name="CHANGED_PATHS">
213
+      <list>
214
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentsTest.java" />
215
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java" />
216
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/InstructorsTest.java" />
217
+        <option value="$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java" />
218
+        <option value="$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java" />
219
+      </list>
220
+    </option>
221
+  </component>
222
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
223
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
224
+  <component name="JsGulpfileManager">
225
+    <detection-done>true</detection-done>
226
+    <sorting>DEFINITION_ORDER</sorting>
227
+  </component>
228
+  <component name="ProjectFrameBounds" fullScreen="true">
229
+    <option name="x" value="-296" />
230
+    <option name="y" value="-1080" />
231
+    <option name="width" value="1920" />
232
+    <option name="height" value="1080" />
233
+  </component>
234
+  <component name="ProjectInspectionProfilesVisibleTreeState">
235
+    <entry key="Project Default">
236
+      <profile-state>
237
+        <expanded-state>
238
+          <State />
239
+          <State>
240
+            <id>Android</id>
241
+          </State>
242
+          <State>
243
+            <id>CSS</id>
244
+          </State>
245
+          <State>
246
+            <id>CorrectnessLintAndroid</id>
247
+          </State>
248
+          <State>
249
+            <id>Java</id>
250
+          </State>
251
+          <State>
252
+            <id>LintAndroid</id>
253
+          </State>
254
+          <State>
255
+            <id>Probable bugsCSS</id>
256
+          </State>
257
+          <State>
258
+            <id>Probable bugsJava</id>
259
+          </State>
260
+          <State>
261
+            <id>RELAX NG</id>
262
+          </State>
263
+          <State>
264
+            <id>XPath</id>
265
+          </State>
266
+          <State>
267
+            <id>XSLT</id>
268
+          </State>
269
+        </expanded-state>
270
+        <selected-state>
271
+          <State>
272
+            <id>Android</id>
273
+          </State>
274
+        </selected-state>
275
+      </profile-state>
276
+    </entry>
277
+  </component>
278
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
279
+  <component name="ProjectView">
280
+    <navigator proportions="" version="1">
281
+      <foldersAlwaysOnTop value="true" />
282
+    </navigator>
283
+    <panes>
284
+      <pane id="PackagesPane" />
285
+      <pane id="Scope" />
286
+      <pane id="ProjectPane">
287
+        <subPane>
288
+          <expand>
289
+            <path>
290
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
291
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
292
+            </path>
293
+            <path>
294
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
295
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
296
+              <item name="src" type="462c0819:PsiDirectoryNode" />
297
+            </path>
298
+            <path>
299
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
300
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
301
+              <item name="src" type="462c0819:PsiDirectoryNode" />
302
+              <item name="main" type="462c0819:PsiDirectoryNode" />
303
+            </path>
304
+            <path>
305
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
306
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
307
+              <item name="src" type="462c0819:PsiDirectoryNode" />
308
+              <item name="main" type="462c0819:PsiDirectoryNode" />
309
+              <item name="java" type="462c0819:PsiDirectoryNode" />
310
+            </path>
311
+            <path>
312
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
313
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
314
+              <item name="src" type="462c0819:PsiDirectoryNode" />
315
+              <item name="main" type="462c0819:PsiDirectoryNode" />
316
+              <item name="java" type="462c0819:PsiDirectoryNode" />
317
+              <item name="interfaces" type="462c0819:PsiDirectoryNode" />
318
+            </path>
319
+            <path>
320
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
321
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
322
+              <item name="src" type="462c0819:PsiDirectoryNode" />
323
+              <item name="test" type="462c0819:PsiDirectoryNode" />
324
+            </path>
325
+            <path>
326
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
327
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
328
+              <item name="src" type="462c0819:PsiDirectoryNode" />
329
+              <item name="test" type="462c0819:PsiDirectoryNode" />
330
+              <item name="java" type="462c0819:PsiDirectoryNode" />
331
+            </path>
332
+            <path>
333
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
334
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
335
+              <item name="src" type="462c0819:PsiDirectoryNode" />
336
+              <item name="test" type="462c0819:PsiDirectoryNode" />
337
+              <item name="java" type="462c0819:PsiDirectoryNode" />
338
+              <item name="interfaces" type="462c0819:PsiDirectoryNode" />
339
+            </path>
340
+            <path>
341
+              <item name="interfaces-1" type="b2602c69:ProjectViewProjectNode" />
342
+              <item name="CR-MacroLabs-OOP-InstructorStudentClassroom" type="462c0819:PsiDirectoryNode" />
343
+              <item name="target" type="462c0819:PsiDirectoryNode" />
344
+            </path>
345
+          </expand>
346
+          <select />
347
+        </subPane>
348
+      </pane>
349
+    </panes>
350
+  </component>
351
+  <component name="PropertiesComponent">
352
+    <property name="WebServerToolWindowFactoryState" value="false" />
353
+    <property name="aspect.path.notification.shown" value="true" />
354
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542476581883" />
355
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
356
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
357
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
358
+    <property name="settings.editor.selected.configurable" value="preferences.sourceCode" />
359
+  </component>
360
+  <component name="RunDashboard">
361
+    <option name="ruleStates">
362
+      <list>
363
+        <RuleState>
364
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
365
+        </RuleState>
366
+        <RuleState>
367
+          <option name="name" value="StatusDashboardGroupingRule" />
368
+        </RuleState>
369
+      </list>
370
+    </option>
371
+  </component>
372
+  <component name="RunManager" selected="JUnit.ZipCodeWilmingtonTest">
373
+    <configuration name="InstructorsTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
374
+      <module name="interfaces-1" />
375
+      <extension name="coverage">
376
+        <pattern>
377
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
378
+          <option name="ENABLED" value="true" />
379
+        </pattern>
380
+      </extension>
381
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
382
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.InstructorsTest" />
383
+      <method v="2">
384
+        <option name="Make" enabled="true" />
385
+      </method>
386
+    </configuration>
387
+    <configuration name="InstructorsTest.getInstance" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
388
+      <module name="interfaces-1" />
389
+      <extension name="coverage">
390
+        <pattern>
391
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
392
+          <option name="ENABLED" value="true" />
393
+        </pattern>
394
+      </extension>
395
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
396
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.InstructorsTest" />
397
+      <option name="METHOD_NAME" value="getInstance" />
398
+      <option name="TEST_OBJECT" value="method" />
399
+      <method v="2">
400
+        <option name="Make" enabled="true" />
401
+      </method>
402
+    </configuration>
403
+    <configuration name="ZipCodeWilmingtonTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
404
+      <module name="interfaces-1" />
405
+      <extension name="coverage">
406
+        <pattern>
407
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
408
+          <option name="ENABLED" value="true" />
409
+        </pattern>
410
+      </extension>
411
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
412
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.ZipCodeWilmingtonTest" />
413
+      <method v="2">
414
+        <option name="Make" enabled="true" />
415
+      </method>
416
+    </configuration>
417
+    <configuration name="ZipCodeWilmingtonTest.hostLecture" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
418
+      <module name="interfaces-1" />
419
+      <extension name="coverage">
420
+        <pattern>
421
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
422
+          <option name="ENABLED" value="true" />
423
+        </pattern>
424
+      </extension>
425
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
426
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.ZipCodeWilmingtonTest" />
427
+      <option name="METHOD_NAME" value="hostLecture" />
428
+      <option name="TEST_OBJECT" value="method" />
429
+      <method v="2">
430
+        <option name="Make" enabled="true" />
431
+      </method>
432
+    </configuration>
433
+    <configuration name="ZipCodeWilmingtonTest.hostLectureById" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
434
+      <module name="interfaces-1" />
435
+      <extension name="coverage">
436
+        <pattern>
437
+          <option name="PATTERN" value="io.zipcoder.interfaces.*" />
438
+          <option name="ENABLED" value="true" />
439
+        </pattern>
440
+      </extension>
441
+      <option name="PACKAGE_NAME" value="io.zipcoder.interfaces" />
442
+      <option name="MAIN_CLASS_NAME" value="io.zipcoder.interfaces.ZipCodeWilmingtonTest" />
443
+      <option name="METHOD_NAME" value="hostLectureById" />
444
+      <option name="TEST_OBJECT" value="method" />
445
+      <method v="2">
446
+        <option name="Make" enabled="true" />
447
+      </method>
448
+    </configuration>
449
+    <list>
450
+      <item itemvalue="JUnit.InstructorsTest.getInstance" />
451
+      <item itemvalue="JUnit.InstructorsTest" />
452
+      <item itemvalue="JUnit.ZipCodeWilmingtonTest.hostLecture" />
453
+      <item itemvalue="JUnit.ZipCodeWilmingtonTest.hostLectureById" />
454
+      <item itemvalue="JUnit.ZipCodeWilmingtonTest" />
455
+    </list>
456
+    <recent_temporary>
457
+      <list>
458
+        <item itemvalue="JUnit.ZipCodeWilmingtonTest" />
459
+        <item itemvalue="JUnit.ZipCodeWilmingtonTest.hostLectureById" />
460
+        <item itemvalue="JUnit.ZipCodeWilmingtonTest.hostLecture" />
461
+        <item itemvalue="JUnit.InstructorsTest" />
462
+        <item itemvalue="JUnit.InstructorsTest.getInstance" />
463
+      </list>
464
+    </recent_temporary>
465
+  </component>
466
+  <component name="SvnConfiguration">
467
+    <configuration />
468
+  </component>
469
+  <component name="TaskManager">
470
+    <task active="true" id="Default" summary="Default task">
471
+      <changelist id="8138bc5d-6db1-47c1-b508-e0c3ac4388d2" name="Default Changelist" comment="" />
472
+      <created>1542472970328</created>
473
+      <option name="number" value="Default" />
474
+      <option name="presentableId" value="Default" />
475
+      <updated>1542472970328</updated>
476
+      <workItem from="1542472973538" duration="3597000" />
477
+    </task>
478
+    <servers />
479
+  </component>
480
+  <component name="TestHistory">
481
+    <history-entry file="StudentsTest - 2018.11.17 at 11h 48m 12s.xml">
482
+      <configuration name="StudentsTest" configurationId="JUnit" />
483
+    </history-entry>
484
+    <history-entry file="InstructorsTest_getInstance - 2018.11.17 at 12h 00m 16s.xml">
485
+      <configuration name="InstructorsTest.getInstance" configurationId="JUnit" />
486
+    </history-entry>
487
+    <history-entry file="InstructorsTest - 2018.11.17 at 12h 00m 36s.xml">
488
+      <configuration name="InstructorsTest" configurationId="JUnit" />
489
+    </history-entry>
490
+    <history-entry file="InstructorsTest - 2018.11.17 at 12h 02m 54s.xml">
491
+      <configuration name="InstructorsTest" configurationId="JUnit" />
492
+    </history-entry>
493
+    <history-entry file="InstructorsTest - 2018.11.17 at 12h 07m 40s.xml">
494
+      <configuration name="InstructorsTest" configurationId="JUnit" />
495
+    </history-entry>
496
+    <history-entry file="InstructorsTest - 2018.11.17 at 12h 09m 24s.xml">
497
+      <configuration name="InstructorsTest" configurationId="JUnit" />
498
+    </history-entry>
499
+    <history-entry file="ZipCodeWilmingtonTest_hostLecture - 2018.11.17 at 12h 39m 03s.xml">
500
+      <configuration name="ZipCodeWilmingtonTest.hostLecture" configurationId="JUnit" />
501
+    </history-entry>
502
+    <history-entry file="ZipCodeWilmingtonTest_hostLectureById - 2018.11.17 at 12h 41m 39s.xml">
503
+      <configuration name="ZipCodeWilmingtonTest.hostLectureById" configurationId="JUnit" />
504
+    </history-entry>
505
+    <history-entry file="ZipCodeWilmingtonTest - 2018.11.17 at 12h 42m 02s.xml">
506
+      <configuration name="ZipCodeWilmingtonTest" configurationId="JUnit" />
507
+    </history-entry>
508
+    <history-entry file="ZipCodeWilmingtonTest - 2018.11.17 at 12h 42m 39s.xml">
509
+      <configuration name="ZipCodeWilmingtonTest" configurationId="JUnit" />
510
+    </history-entry>
511
+  </component>
512
+  <component name="TimeTrackingManager">
513
+    <option name="totallyTimeSpent" value="3597000" />
514
+  </component>
515
+  <component name="ToolWindowManager">
516
+    <frame x="-296" y="-1080" width="1920" height="1080" extended-state="0" />
517
+    <editor active="true" />
518
+    <layout>
519
+      <window_info id="Image Layers" />
520
+      <window_info id="Designer" />
521
+      <window_info id="UI Designer" />
522
+      <window_info id="Capture Tool" />
523
+      <window_info id="Favorites" side_tool="true" />
524
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12673056" />
525
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
526
+      <window_info anchor="bottom" id="Messages" weight="0.32970297" />
527
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
528
+      <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
529
+      <window_info anchor="bottom" id="Terminal" />
530
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
531
+      <window_info anchor="bottom" id="Message" order="0" />
532
+      <window_info anchor="bottom" id="Find" order="1" />
533
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32970297" />
534
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
535
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
536
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
537
+      <window_info anchor="bottom" id="TODO" order="6" />
538
+      <window_info anchor="right" id="Palette" />
539
+      <window_info anchor="right" id="Theme Preview" />
540
+      <window_info anchor="right" id="Capture Analysis" />
541
+      <window_info anchor="right" id="Palette&#9;" />
542
+      <window_info anchor="right" id="Database" />
543
+      <window_info anchor="right" id="Maven Projects" />
544
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
545
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
546
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
547
+    </layout>
548
+  </component>
549
+  <component name="TypeScriptGeneratedFilesManager">
550
+    <option name="version" value="1" />
551
+  </component>
552
+  <component name="VcsContentAnnotationSettings">
553
+    <option name="myLimit" value="2678400000" />
554
+  </component>
555
+  <component name="editorHistoryManager">
556
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/PeopleTest.java">
557
+      <provider selected="true" editor-type-id="text-editor">
558
+        <state relative-caret-position="-267">
559
+          <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
560
+        </state>
561
+      </provider>
562
+    </entry>
563
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/Assert.class">
564
+      <provider selected="true" editor-type-id="text-editor">
565
+        <state relative-caret-position="217">
566
+          <caret line="333" selection-start-line="333" selection-end-line="333" />
567
+        </state>
568
+      </provider>
569
+    </entry>
570
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/People.java">
571
+      <provider selected="true" editor-type-id="text-editor">
572
+        <state relative-caret-position="264">
573
+          <caret line="24" column="41" lean-forward="true" selection-start-line="24" selection-start-column="41" selection-end-line="24" selection-end-column="41" />
574
+          <folding>
575
+            <element signature="e#198#199#0" expanded="true" />
576
+            <element signature="e#242#243#0" expanded="true" />
577
+            <element signature="e#809#810#0" expanded="true" />
578
+            <element signature="e#856#857#0" expanded="true" />
579
+          </folding>
580
+        </state>
581
+      </provider>
582
+    </entry>
583
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Student.java">
584
+      <provider selected="true" editor-type-id="text-editor">
585
+        <state relative-caret-position="30">
586
+          <caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
587
+        </state>
588
+      </provider>
589
+    </entry>
590
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Students.java">
591
+      <provider selected="true" editor-type-id="text-editor">
592
+        <state relative-caret-position="75">
593
+          <caret line="5" column="60" lean-forward="true" selection-start-line="5" selection-start-column="4" selection-end-line="5" selection-end-column="60" />
594
+          <folding>
595
+            <element signature="e#2497#2498#0" expanded="true" />
596
+            <element signature="e#2528#2529#0" expanded="true" />
597
+          </folding>
598
+        </state>
599
+      </provider>
600
+    </entry>
601
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/StudentsTest.java">
602
+      <provider selected="true" editor-type-id="text-editor">
603
+        <state relative-caret-position="15">
604
+          <caret line="1" lean-forward="true" selection-start-line="1" selection-end-line="1" />
605
+        </state>
606
+      </provider>
607
+    </entry>
608
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java">
609
+      <provider selected="true" editor-type-id="text-editor">
610
+        <state relative-caret-position="390">
611
+          <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
612
+          <folding>
613
+            <element signature="e#242#243#0" expanded="true" />
614
+            <element signature="e#276#277#0" expanded="true" />
615
+            <element signature="e#691#692#0" expanded="true" />
616
+            <element signature="e#722#723#0" expanded="true" />
617
+            <element signature="e#772#773#0" expanded="true" />
618
+            <element signature="e#806#807#0" expanded="true" />
619
+          </folding>
620
+        </state>
621
+      </provider>
622
+    </entry>
623
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructors.java">
624
+      <provider selected="true" editor-type-id="text-editor">
625
+        <state relative-caret-position="315">
626
+          <caret line="21" column="26" lean-forward="true" selection-start-line="21" selection-start-column="26" selection-end-line="21" selection-end-column="26" />
627
+          <folding>
628
+            <element signature="e#196#197#0" expanded="true" />
629
+            <element signature="e#230#231#0" expanded="true" />
630
+          </folding>
631
+        </state>
632
+      </provider>
633
+    </entry>
634
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/InstructorsTest.java">
635
+      <provider selected="true" editor-type-id="text-editor">
636
+        <state relative-caret-position="345">
637
+          <caret line="26" column="1" lean-forward="true" selection-start-line="26" selection-start-column="1" selection-end-line="26" selection-end-column="1" />
638
+        </state>
639
+      </provider>
640
+    </entry>
641
+    <entry file="file://$PROJECT_DIR$/src/main/java/io/zipcoder/interfaces/Instructor.java">
642
+      <provider selected="true" editor-type-id="text-editor">
643
+        <state relative-caret-position="45">
644
+          <caret line="3" column="43" lean-forward="true" selection-start-line="3" selection-start-column="43" selection-end-line="3" selection-end-column="43" />
645
+          <folding>
646
+            <element signature="e#137#138#0" expanded="true" />
647
+            <element signature="e#168#169#0" expanded="true" />
648
+            <element signature="e#202#203#0" expanded="true" />
649
+            <element signature="e#227#228#0" expanded="true" />
650
+            <element signature="e#291#292#0" expanded="true" />
651
+            <element signature="e#335#336#0" expanded="true" />
652
+          </folding>
653
+        </state>
654
+      </provider>
655
+    </entry>
656
+    <entry file="file://$PROJECT_DIR$/src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java">
657
+      <provider selected="true" editor-type-id="text-editor">
658
+        <state relative-caret-position="234">
659
+          <caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
660
+          <folding>
661
+            <element signature="imports" expanded="true" />
662
+          </folding>
663
+        </state>
664
+      </provider>
665
+    </entry>
666
+  </component>
667
+</project>

+ 16
- 0
interfaces-1.iml Näytä tiedosto

@@ -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>

+ 1
- 0
src/main/java/io/zipcoder/interfaces/Instructor.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public class Instructor extends Person implements Teacher {
    public Instructor(String name, long id) {
        super(name, id);
    }

    public Instructor(long id) {
        super(id);
    }

    public void teach(Learner learner, double numberOfHours) {
        learner.learn(numberOfHours);
    }

    public void Lecture(Learner[] learners, double numberOfHours) {
        double numberOfHoursPerLearner = numberOfHours / learners.length;
        for(Learner learner: learners) {
            learner.learn(numberOfHoursPerLearner);
        }
    }


}

+ 1
- 0
src/main/java/io/zipcoder/interfaces/Instructors.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public class Instructors extends People<Instructor> {
    private static final Instructors ourInstance = new Instructors();

    public static Instructors getInstance() {
        return ourInstance;
    }

    private Instructors() {
        personList.add(new Instructor("Will",2));
        personList.add(new Instructor("Dolio",4));
        personList.add(new Instructor("Kris",7));
        personList.add(new Instructor("Nhu",8));
    }

    @Override
    public Instructor[] getArray() {
        Instructor[] instructor = new Instructor[personList.size()];
        for(int i = 0; i < personList.size(); i++)
            instructor[i] = personList.get(i);
        return instructor;
    }
}

+ 1
- 0
src/main/java/io/zipcoder/interfaces/Learner.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public interface Learner {
    void learn(double numberOfHours);
}

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

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import java.util.ArrayList;

public abstract class People <E extends Person> {

        ArrayList<E> personList = new ArrayList<E>();


    public void add(E person){
           personList.add(person);
       }

        public E findByID(long id){
           E personToFind = null;
            for (int i = 0; i < personList.size(); i++) {
                if(personList.get(i).getId() == id) {
                    personToFind = personList.get(i);
                }
            }

            return personToFind;
        }

        public void removeById(long id) {
           for(E p: personList) {
               if (p.getId() == id) {
                   personList.remove(p);
                   break;
               }
           }
        }

        public int getCount(){
           return personList.size();
        }

        public abstract E[] getArray();

        public boolean removeAll(){
           ArrayList<E> array = new ArrayList<E>();
           return personList.removeAll(array);
        }
}

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

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

+ 1
- 0
src/main/java/io/zipcoder/interfaces/Student.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public class Student extends Person implements Learner{
    private double totalStudyTime;

    public Student() {
        super();
    }

    public Student(String name,long id) {
        super(name, id);

    }

    public void learn(double numberOfHours) {
        totalStudyTime+=numberOfHours;
    }

    public double getTotalStudyTime() {
        return totalStudyTime;
    }
}

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

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;
import java.util.*;

public class Students extends People <Student> {

    private static final Students INSTANCE = new Students();
    private Students(){

        personList.add(new Student( "Ned Redmond",1));
        personList.add(new Student( "Seth Abrams",2));
        personList.add(new Student( "Akeem Cherry",3));
        personList.add(new Student( "Whitney Martinez",4));
        personList.add(new Student( "Nira Parikh",5));
        personList.add(new Student( "Connor Dunnigan",6));
        personList.add(new Student( "Christian Sheridan",7));
        personList.add(new Student( "Curtis Cook",8));
        personList.add(new Student( "Nuridalia Hernandez",9));
        personList.add(new Student( "Brandon DeFrancis",10));
        personList.add(new Student( "De'Jon Johnson",11));
        personList.add(new Student( "Demetrius Murray",12));
        personList.add(new Student( "Elliott Stansbury",13));
        personList.add(new Student( "Nathan Hall",14));
        personList.add(new Student( "Jae Joson",15));
        personList.add(new Student( "Jacob Anderson",16));
        personList.add(new Student( "Jose Bedolla",17));
        personList.add(new Student( "Jenn Chao",18));
        personList.add(new Student( "Jennifer Tinkler",19));
        personList.add(new Student( "Jonathan Hinds",20));
        personList.add(new Student( "Jay Samuels",21));
        personList.add(new Student( "Jevit Tith",22));
        personList.add(new Student( "Lauren Green",23));
        personList.add(new Student( "Kate Moore",24));
        personList.add(new Student( "Michelle DiMarino",25));
        personList.add(new Student( "Maggie Pierse",26));
        personList.add(new Student( "Nick Satinover",27));
        personList.add(new Student( "Chaitali Patel",28));
        personList.add(new Student( "Yesoda Sanka",29));
        personList.add(new Student( "Saurav Kamath",30));
        personList.add(new Student( "Sam Bhutani",31));
        personList.add(new Student( "Soujanya Buragapu",32));
        personList.add(new Student( "Steffon Williams",33));
        personList.add(new Student( "Zavon Malone",34));
        personList.add(new Student( "Thuy Kong",35));
        personList.add(new Student( "Thulasi Puppala",36));
        personList.add(new Student( "Trinh Tong",37));
        personList.add(new Student( "William Brown",38));
        personList.add(new Student( "Xzavia Cuello",39));
    }

    public static Students getInstance(){
        return INSTANCE;
    }

    @Override
    public Student[] getArray(){
        Student[] studs = new Student[personList.size()];
        for(int i = 0; i < personList.size(); i++)
            studs[i] = personList.get(i);
        return studs;
    }
}

+ 1
- 0
src/main/java/io/zipcoder/interfaces/Teacher.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public interface Teacher {

    void teach(Learner learner, double numberOfHours);

    void Lecture(Learner[] learners, double numberOfHours);

}

+ 1
- 0
src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

public class ZipCodeWilmington {
    private static final Students students = Students.getInstance();
    private static final Instructors instructors = Instructors.getInstance();
    private static final ZipCodeWilmington INSTANCE = new ZipCodeWilmington();

    public static ZipCodeWilmington getInstance() {
        return INSTANCE;
    }

    private ZipCodeWilmington() {
    }

    public void hostLecture(Teacher teacher, double numberOfHours) {
        Student[] students1 = students.getArray();
        teacher.Lecture(students1,numberOfHours);
    }

    public void hostLecture(long id, double numberOfHours) {
        Student[] students1 = students.getArray();
        for (int i = 0; i < instructors.getCount(); i++) {
            if (instructors.personList.get(i).getId()==id) {
                instructors.personList.get(i).Lecture(students1,numberOfHours);
            }
        }

    }

    public static Students getStudents() {
        return students;
    }

    public static Instructors getInstructors() {
        return instructors;
    }


}

+ 1
- 0
src/test/java/InstructorTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+import io.zipcoder.interfaces.*;
import org.junit.Assert;
import org.junit.Test;

//public class InstructorTest {
//    Instructor instructor = new Instructor(0L);
//    Student student = new Student(4);
//    Student student2 = new Student(5);
//    Student[] studentArray = {student,student2};
//
//    @Test
//    public void testImplementation() {
//
//        Assert.assertTrue(instructor instanceof Teacher);
//
//    }
//
//    @Test
//    public void testInheritance() {
//
//        Assert.assertTrue(instructor instanceof Person);
//    }
//
//    @Test
//    public void testTeach() {
//        //Given
//        double hour = 4.0;
//
//
//        double expected = 4.0;
//
//        //When
//         instructor.teach(student,hour);
//
//         //than
//        Assert.assertEquals(expected,student.getTotalStudyTime(),0);
//    }
//
//    @Test
//    public void testLecture() {
//        //Given
//        double expected = 2;
//
//        //when
//        instructor.Lecture(studentArray, 4);
//        double actual = student.getTotalStudyTime();
//
//        Assert.assertEquals(expected,actual, 0.01);
//
//   }
//}

+ 1
- 0
src/test/java/io/zipcoder/interfaces/InstructorsTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import org.junit.Assert;
import org.junit.Test;

import static org.junit.Assert.*;

public class InstructorsTest {

    @Test
    public void getInstance() {

            Instructors instructors2 = Instructors.getInstance();
            Instructors instructors3 = Instructors.getInstance();

            Assert.assertEquals(instructors2,instructors3);

    }

    @Test
    public void theInitializationSetupStudents(){
        Instructors instructors2 = Instructors.getInstance();
        int expected = 4;
        int actual = instructors2.getArray().length;
        Assert.assertEquals(expected,actual);
    }
}

+ 1
- 0
src/test/java/io/zipcoder/interfaces/PeopleTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import org.junit.Assert;
import org.junit.Test;

import static org.junit.Assert.*;

public class PeopleTest {

 Person person1, person2;
 Student student1;
 Instructor instructor;
 Students students;
 Instructors instructors;

 public PeopleTest() {
     students = Students.getInstance();

     person1 = new Person("person1",45);
     person2 = new Person("person2", 56);
     student1 = new Student("student1",50);
     instructor = new Instructor("instructor1",54);
     students.add(student1);
 }

 @Test
    public void addTest(){
     //Given
     Student newStudent = new Student("student2",43);

     //When
     Integer expected = 41;
     students.add(newStudent);
     Integer actual = students.getCount();

     //Then
     Assert.assertEquals(expected,actual);

 }

    @Test
    public void findByIdTest(){
        //When
        long expected = student1.getId();

        Student actual = students.findByID(50);

        //Then
        Assert.assertEquals(expected,actual.getId());

    }

    @Test
    public void removeTest(){
        //When
        Integer expected = 39;

        students.removeById(50);
        Integer actual = students.getCount();

        //Then
        Assert.assertEquals(expected,actual);

    }

    @Test
    public void removeAllTest(){

       //Given
        Instructors instructors = Instructors.getInstance();

        //When

        Integer expected = 0;

        instructors.removeAll();
        Integer actual = instructors.getCount();

        //Then
        Assert.assertEquals(expected,actual);

    }

}

+ 35
- 0
src/test/java/io/zipcoder/interfaces/PersonTest.java Näytä tiedosto

@@ -0,0 +1,35 @@
1
+package io.zipcoder.interfaces;
2
+
3
+import org.junit.Assert;
4
+import org.junit.Test;
5
+
6
+public class PersonTest {
7
+
8
+    @Test
9
+    public void testConstructor(){
10
+        //Given
11
+        Person p = new Person(24);
12
+        long expected = 24l ;
13
+
14
+        //When
15
+        long actual = p.getId();
16
+
17
+        //Than
18
+        Assert.assertEquals(expected,actual);
19
+    }
20
+
21
+    @Test
22
+    public void testSetName(){
23
+        //Given
24
+        Person p = new Person(24);
25
+        String expected = p.getName();
26
+
27
+        //When
28
+        String actual = "Chaitali";
29
+       p.setName("Chaitali");
30
+
31
+        //Than
32
+        Assert.assertEquals(expected,actual);
33
+    }
34
+
35
+}

+ 1
- 0
src/test/java/io/zipcoder/interfaces/StudentTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import org.junit.Assert;
import org.junit.Test;

public class StudentTest {
    @Test
    public void testImplementation(){
        //Given
        Student student = new Student();

        Assert.assertTrue(student instanceof Learner);

    }

    @Test
    public void testInheritance(){
        //Given
        Person student = new Person(24);

        Assert.assertTrue(student instanceof Person);

    }

    @Test
    public void testLearn(){
        //Given
        double numberOfHours = 500;
        Student student = new Student();

        //When
        student.learn(numberOfHours);
        double actual = student.getTotalStudyTime();
        double expected = 500;

        //Then
        Assert.assertEquals(expected, actual, 0);

    }


}

+ 1
- 0
src/test/java/io/zipcoder/interfaces/StudentsTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import org.junit.Assert;
import org.junit.Test;


public class StudentsTest {

    @Test
    public void getInstance() {
        Students student1 = Students.getInstance();
        Students student2 = Students.getInstance();

        Assert.assertEquals(student1,student2);
    }

    @Test
    public void theInitializationSetupStudents(){
        Students student1 = Students.getInstance();
        int expected = 39;
        int actual = student1.getArray().length;
        Assert.assertEquals(expected,actual);
    }
}

+ 0
- 5
src/test/java/io/zipcoder/interfaces/TestPerson.java Näytä tiedosto

@@ -1,5 +0,0 @@
1
-package io.zipcoder.interfaces;
2
-
3
-public class TestPerson {
4
-
5
-}

+ 1
- 0
src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java Näytä tiedosto

@@ -0,0 +1 @@
1
+package io.zipcoder.interfaces;

import org.junit.Assert;
import org.junit.Test;

public class ZipCodeWilmingtonTest {


    @Test
    public void hostLecture() {
        ZipCodeWilmington zipCode = ZipCodeWilmington.getInstance();
        Instructor instructor = zipCode.getInstructors().getArray()[0];
        zipCode.hostLecture(instructor,39);
        double expected =2;
        double actual = zipCode.getStudents().getArray()[0].getTotalStudyTime();

        Assert.assertEquals(expected,actual,.1);
    }

    @Test
    public void hostLectureById() {
        ZipCodeWilmington zipCode = ZipCodeWilmington.getInstance();
        Instructor instructor = zipCode.getInstructors().getArray()[0];
        zipCode.hostLecture(instructor.getId(),39);
        double expected =1;
        double actual = zipCode.getStudents().getArray()[0].getTotalStudyTime();

        Assert.assertEquals(expected,actual,.1);
    }
}