#1 Done

Ouvert
chu1ta26 veut fusionner 12 révision(s) depuis chu1ta26/ZCW-PhoneBook:master vers master

+ 1
- 0
.gitignore Voir le fichier

@@ -23,3 +23,4 @@
23 23
 hs_err_pid*
24 24
 
25 25
 .DS_Store
26
+.idea/*

+ 1
- 0
.idea/.name Voir le fichier

@@ -0,0 +1 @@
1
+phonebook

+ 16
- 0
.idea/compiler.xml Voir le fichier

@@ -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="phonebook" />
10
+      </profile>
11
+    </annotationProcessing>
12
+    <bytecodeTargetLevel>
13
+      <module name="phonebook" target="1.8" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 6
- 0
.idea/encodings.xml Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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_11" project-jdk-name="11" project-jdk-type="JavaSDK">
11
+    <output url="file://$PROJECT_DIR$/classes" />
12
+  </component>
13
+</project>

+ 8
- 0
.idea/modules.xml Voir le fichier

@@ -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$/phonebook.iml" filepath="$PROJECT_DIR$/phonebook.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml Voir le fichier

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

+ 407
- 0
.idea/workspace.xml Voir le fichier

@@ -0,0 +1,407 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="c1cc7e2b-f4a6-4d52-8f95-c91c49ec1d86" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/.name" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
13
+      <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
14
+      <change afterPath="$PROJECT_DIR$/PhoneBookTest.java" afterDir="false" />
15
+      <change afterPath="$PROJECT_DIR$/README.TXT" afterDir="false" />
16
+      <change afterPath="$PROJECT_DIR$/package.bluej" afterDir="false" />
17
+      <change afterPath="$PROJECT_DIR$/phonebook.iml" afterDir="false" />
18
+      <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
19
+      <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
20
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/phonebook/PhoneBook.java" beforeDir="false" afterPath="$PROJECT_DIR$/PhoneBook.java" afterDir="false" />
21
+    </list>
22
+    <ignored path="$PROJECT_DIR$/target/" />
23
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
24
+    <option name="SHOW_DIALOG" value="false" />
25
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
26
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
27
+    <option name="LAST_RESOLUTION" value="IGNORE" />
28
+  </component>
29
+  <component name="CoverageDataManager">
30
+    <SUITE FILE_PATH="coverage/phonebook$PhoneBookTest_hasEntrytest.ic" NAME="PhoneBookTest.hasEntrytest Coverage Results" MODIFIED="1540867712119" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
31
+      <FILTER>com.zipcodewilmington.phonebook.*</FILTER>
32
+    </SUITE>
33
+    <SUITE FILE_PATH="coverage/phonebook$PhoneBookTest.ic" NAME="PhoneBookTest Coverage Results" MODIFIED="1540950630450" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
34
+      <FILTER>com.zipcodewilmington.phonebook.*</FILTER>
35
+    </SUITE>
36
+  </component>
37
+  <component name="CoverageViewManager">
38
+    <option name="myElementSize" value="112" />
39
+  </component>
40
+  <component name="FUSProjectUsageTrigger">
41
+    <session id="-2112624635">
42
+      <usages-collector id="statistics.lifecycle.project">
43
+        <counts>
44
+          <entry key="project.closed" value="4" />
45
+          <entry key="project.open.time.1" value="2" />
46
+          <entry key="project.open.time.2" value="1" />
47
+          <entry key="project.open.time.7" value="1" />
48
+          <entry key="project.open.time.8" value="1" />
49
+          <entry key="project.opened" value="5" />
50
+        </counts>
51
+      </usages-collector>
52
+      <usages-collector id="statistics.file.extensions.open">
53
+        <counts>
54
+          <entry key="java" value="4" />
55
+        </counts>
56
+      </usages-collector>
57
+      <usages-collector id="statistics.file.types.open">
58
+        <counts>
59
+          <entry key="JAVA" value="4" />
60
+        </counts>
61
+      </usages-collector>
62
+      <usages-collector id="statistics.file.extensions.edit">
63
+        <counts>
64
+          <entry key="java" value="2828" />
65
+        </counts>
66
+      </usages-collector>
67
+      <usages-collector id="statistics.file.types.edit">
68
+        <counts>
69
+          <entry key="JAVA" value="2828" />
70
+        </counts>
71
+      </usages-collector>
72
+      <usages-collector id="statistics.vcs.git.usages" />
73
+      <usages-collector id="statistics.spring.boot.mvc.usages" />
74
+      <usages-collector id="statistics.js.language.service.starts" />
75
+      <usages-collector id="statistics.spring.boot.run.usages" />
76
+    </session>
77
+  </component>
78
+  <component name="FileEditorManager">
79
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
80
+      <file pinned="false" current-in-tab="true">
81
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java">
82
+          <provider selected="true" editor-type-id="text-editor">
83
+            <state relative-caret-position="330">
84
+              <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
85
+              <folding>
86
+                <element signature="imports" expanded="true" />
87
+              </folding>
88
+            </state>
89
+          </provider>
90
+        </entry>
91
+      </file>
92
+    </leaf>
93
+  </component>
94
+  <component name="Git.Settings">
95
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
96
+  </component>
97
+  <component name="IdeDocumentHistory">
98
+    <option name="CHANGED_PATHS">
99
+      <list>
100
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java" />
101
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/phonebook/PhoneBook.java" />
102
+      </list>
103
+    </option>
104
+  </component>
105
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
106
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
107
+  <component name="JsGulpfileManager">
108
+    <detection-done>true</detection-done>
109
+    <sorting>DEFINITION_ORDER</sorting>
110
+  </component>
111
+  <component name="ProjectFrameBounds">
112
+    <option name="x" value="167" />
113
+    <option name="y" value="61" />
114
+    <option name="width" value="1051" />
115
+    <option name="height" value="684" />
116
+  </component>
117
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
118
+  <component name="ProjectView">
119
+    <navigator currentView="PackagesPane" proportions="" version="1">
120
+      <foldersAlwaysOnTop value="true" />
121
+    </navigator>
122
+    <panes>
123
+      <pane id="ProjectPane" />
124
+      <pane id="PackagesPane">
125
+        <subPane>
126
+          <expand>
127
+            <path>
128
+              <item name="phonebook" type="58d84e3e:PackageViewProjectNode" />
129
+              <item name="phonebook" type="616d4139:PackageViewModuleNode" />
130
+            </path>
131
+            <path>
132
+              <item name="phonebook" type="58d84e3e:PackageViewProjectNode" />
133
+              <item name="phonebook" type="616d4139:PackageViewModuleNode" />
134
+              <item name="com.zipcodewilmington.phonebook" type="1f31426a:PackageElementNode" />
135
+            </path>
136
+          </expand>
137
+          <select />
138
+        </subPane>
139
+      </pane>
140
+      <pane id="Scope" />
141
+    </panes>
142
+  </component>
143
+  <component name="PropertiesComponent">
144
+    <property name="WebServerToolWindowFactoryState" value="false" />
145
+    <property name="aspect.path.notification.shown" value="true" />
146
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1540951523368" />
147
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
148
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
149
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
150
+    <property name="settings.editor.selected.configurable" value="vcs.Git" />
151
+  </component>
152
+  <component name="RunDashboard">
153
+    <option name="ruleStates">
154
+      <list>
155
+        <RuleState>
156
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
157
+        </RuleState>
158
+        <RuleState>
159
+          <option name="name" value="StatusDashboardGroupingRule" />
160
+        </RuleState>
161
+      </list>
162
+    </option>
163
+  </component>
164
+  <component name="RunManager" selected="JUnit.PhoneBookTest">
165
+    <configuration name="PhoneBookTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
166
+      <module name="phonebook" />
167
+      <extension name="coverage">
168
+        <pattern>
169
+          <option name="PATTERN" value="com.zipcodewilmington.phonebook.*" />
170
+          <option name="ENABLED" value="true" />
171
+        </pattern>
172
+      </extension>
173
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.phonebook" />
174
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.phonebook.PhoneBookTest" />
175
+      <method v="2">
176
+        <option name="Make" enabled="true" />
177
+      </method>
178
+    </configuration>
179
+    <configuration name="PhoneBookTest.getContactTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
180
+      <module name="phonebook" />
181
+      <extension name="coverage">
182
+        <pattern>
183
+          <option name="PATTERN" value="com.zipcodewilmington.phonebook.*" />
184
+          <option name="ENABLED" value="true" />
185
+        </pattern>
186
+      </extension>
187
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.phonebook" />
188
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.phonebook.PhoneBookTest" />
189
+      <option name="METHOD_NAME" value="getContactTest" />
190
+      <option name="TEST_OBJECT" value="method" />
191
+      <method v="2">
192
+        <option name="Make" enabled="true" />
193
+      </method>
194
+    </configuration>
195
+    <configuration name="PhoneBookTest.hasEntrytest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
196
+      <module name="phonebook" />
197
+      <extension name="coverage">
198
+        <pattern>
199
+          <option name="PATTERN" value="com.zipcodewilmington.phonebook.*" />
200
+          <option name="ENABLED" value="true" />
201
+        </pattern>
202
+      </extension>
203
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.phonebook" />
204
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.phonebook.PhoneBookTest" />
205
+      <option name="METHOD_NAME" value="hasEntrytest" />
206
+      <option name="TEST_OBJECT" value="method" />
207
+      <method v="2">
208
+        <option name="Make" enabled="true" />
209
+      </method>
210
+    </configuration>
211
+    <configuration name="PhoneBookTest.listNamesAndNumbers" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
212
+      <module name="phonebook" />
213
+      <extension name="coverage">
214
+        <pattern>
215
+          <option name="PATTERN" value="com.zipcodewilmington.phonebook.*" />
216
+          <option name="ENABLED" value="true" />
217
+        </pattern>
218
+      </extension>
219
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.phonebook" />
220
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.phonebook.PhoneBookTest" />
221
+      <option name="METHOD_NAME" value="listNamesAndNumbers" />
222
+      <option name="TEST_OBJECT" value="method" />
223
+      <method v="2">
224
+        <option name="Make" enabled="true" />
225
+      </method>
226
+    </configuration>
227
+    <configuration name="PhoneBookTest.removeTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
228
+      <module name="phonebook" />
229
+      <extension name="coverage">
230
+        <pattern>
231
+          <option name="PATTERN" value="com.zipcodewilmington.phonebook.*" />
232
+          <option name="ENABLED" value="true" />
233
+        </pattern>
234
+      </extension>
235
+      <option name="PACKAGE_NAME" value="com.zipcodewilmington.phonebook" />
236
+      <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.phonebook.PhoneBookTest" />
237
+      <option name="METHOD_NAME" value="removeTest" />
238
+      <option name="TEST_OBJECT" value="method" />
239
+      <method v="2">
240
+        <option name="Make" enabled="true" />
241
+      </method>
242
+    </configuration>
243
+    <list>
244
+      <item itemvalue="JUnit.PhoneBookTest.hasEntrytest" />
245
+      <item itemvalue="JUnit.PhoneBookTest.removeTest" />
246
+      <item itemvalue="JUnit.PhoneBookTest.listNamesAndNumbers" />
247
+      <item itemvalue="JUnit.PhoneBookTest" />
248
+      <item itemvalue="JUnit.PhoneBookTest.getContactTest" />
249
+    </list>
250
+    <recent_temporary>
251
+      <list>
252
+        <item itemvalue="JUnit.PhoneBookTest" />
253
+        <item itemvalue="JUnit.PhoneBookTest.getContactTest" />
254
+        <item itemvalue="JUnit.PhoneBookTest.listNamesAndNumbers" />
255
+        <item itemvalue="JUnit.PhoneBookTest.hasEntrytest" />
256
+        <item itemvalue="JUnit.PhoneBookTest.removeTest" />
257
+      </list>
258
+    </recent_temporary>
259
+  </component>
260
+  <component name="SvnConfiguration">
261
+    <configuration />
262
+  </component>
263
+  <component name="TaskManager">
264
+    <task active="true" id="Default" summary="Default task">
265
+      <changelist id="c1cc7e2b-f4a6-4d52-8f95-c91c49ec1d86" name="Default Changelist" comment="" />
266
+      <created>1540499895027</created>
267
+      <option name="number" value="Default" />
268
+      <option name="presentableId" value="Default" />
269
+      <updated>1540499895027</updated>
270
+      <workItem from="1540499898845" duration="612000" />
271
+      <workItem from="1540864148384" duration="367000" />
272
+      <workItem from="1540864519963" duration="62000" />
273
+      <workItem from="1540864707344" duration="18158000" />
274
+      <workItem from="1540992916058" duration="166000" />
275
+    </task>
276
+    <servers />
277
+  </component>
278
+  <component name="TestHistory">
279
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 42m 19s.xml">
280
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
281
+    </history-entry>
282
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 42m 27s.xml">
283
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
284
+    </history-entry>
285
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 43m 11s.xml">
286
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
287
+    </history-entry>
288
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 43m 37s.xml">
289
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
290
+    </history-entry>
291
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 46m 20s.xml">
292
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
293
+    </history-entry>
294
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 46m 40s.xml">
295
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
296
+    </history-entry>
297
+    <history-entry file="PhoneBookTest_listNamesAndNumbers - 2018.10.30 at 13h 46m 59s.xml">
298
+      <configuration name="PhoneBookTest.listNamesAndNumbers" configurationId="JUnit" />
299
+    </history-entry>
300
+    <history-entry file="PhoneBookTest - 2018.10.30 at 13h 47m 10s.xml">
301
+      <configuration name="PhoneBookTest" configurationId="JUnit" />
302
+    </history-entry>
303
+    <history-entry file="PhoneBookTest_getContactTest - 2018.10.30 at 21h 49m 44s.xml">
304
+      <configuration name="PhoneBookTest.getContactTest" configurationId="JUnit" />
305
+    </history-entry>
306
+    <history-entry file="PhoneBookTest - 2018.10.30 at 21h 50m 33s.xml">
307
+      <configuration name="PhoneBookTest" configurationId="JUnit" />
308
+    </history-entry>
309
+  </component>
310
+  <component name="TimeTrackingManager">
311
+    <option name="totallyTimeSpent" value="19365000" />
312
+  </component>
313
+  <component name="ToolWindowManager">
314
+    <frame x="167" y="61" width="1051" height="684" extended-state="0" />
315
+    <editor active="true" />
316
+    <layout>
317
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26957384" />
318
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
319
+      <window_info id="Image Layers" order="2" />
320
+      <window_info id="Designer" order="3" />
321
+      <window_info id="UI Designer" order="4" />
322
+      <window_info id="Capture Tool" order="5" />
323
+      <window_info id="Favorites" order="6" side_tool="true" />
324
+      <window_info anchor="bottom" id="Message" order="0" />
325
+      <window_info anchor="bottom" id="Find" order="1" />
326
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49950445" weight="0.3293919" />
327
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
328
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
329
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
330
+      <window_info anchor="bottom" id="TODO" order="6" />
331
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
332
+      <window_info anchor="bottom" id="Terminal" order="8" />
333
+      <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50049555" side_tool="true" weight="0.3293919" />
334
+      <window_info anchor="bottom" id="Version Control" order="10" show_stripe_button="false" />
335
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.3293919" />
336
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
337
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
338
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
339
+      <window_info anchor="right" id="Palette" order="3" />
340
+      <window_info anchor="right" id="Capture Analysis" order="4" />
341
+      <window_info anchor="right" id="Theme Preview" order="5" />
342
+      <window_info anchor="right" id="Palette&#9;" order="6" />
343
+      <window_info anchor="right" id="Database" order="7" />
344
+      <window_info anchor="right" id="Maven Projects" order="8" />
345
+      <window_info anchor="right" id="Coverage" order="9" side_tool="true" weight="0.32903865" />
346
+    </layout>
347
+  </component>
348
+  <component name="TypeScriptGeneratedFilesManager">
349
+    <option name="version" value="1" />
350
+  </component>
351
+  <component name="VcsContentAnnotationSettings">
352
+    <option name="myLimit" value="2678400000" />
353
+  </component>
354
+  <component name="editorHistoryManager">
355
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/src.zip!/java.base/java/util/TreeMap.java">
356
+      <provider selected="true" editor-type-id="text-editor">
357
+        <state relative-caret-position="637">
358
+          <caret line="146" column="11" selection-start-line="146" selection-start-column="11" selection-end-line="146" selection-end-column="11" />
359
+        </state>
360
+      </provider>
361
+    </entry>
362
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/src.zip!/java.base/jdk/internal/reflect/DelegatingMethodAccessorImpl.java">
363
+      <provider selected="true" editor-type-id="text-editor">
364
+        <state relative-caret-position="218">
365
+          <caret line="42" selection-start-line="42" selection-end-line="42" />
366
+        </state>
367
+      </provider>
368
+    </entry>
369
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/phonebook/PhoneBook.java">
370
+      <provider selected="true" editor-type-id="text-editor">
371
+        <state relative-caret-position="1065">
372
+          <caret line="77" column="56" lean-forward="true" selection-start-line="77" selection-start-column="56" selection-end-line="77" selection-end-column="56" />
373
+          <folding>
374
+            <element signature="imports" expanded="true" />
375
+            <element signature="e#1928#1929#0" expanded="true" />
376
+          </folding>
377
+        </state>
378
+      </provider>
379
+    </entry>
380
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java">
381
+      <provider selected="true" editor-type-id="text-editor">
382
+        <state relative-caret-position="330">
383
+          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
384
+          <folding>
385
+            <element signature="imports" expanded="true" />
386
+          </folding>
387
+        </state>
388
+      </provider>
389
+    </entry>
390
+  </component>
391
+  <component name="masterDetails">
392
+    <states>
393
+      <state key="ProjectJDKs.UI">
394
+        <settings>
395
+          <last-edited>1.8</last-edited>
396
+          <splitter-proportions>
397
+            <option name="proportions">
398
+              <list>
399
+                <option value="0.2" />
400
+              </list>
401
+            </option>
402
+          </splitter-proportions>
403
+        </settings>
404
+      </state>
405
+    </states>
406
+  </component>
407
+</project>

+ 82
- 0
PhoneBook.java Voir le fichier

@@ -1,7 +1,89 @@
1 1
  
2 2
 
3
+import java.util.ArrayList;
4
+import java.util.Map;
5
+import java.util.TreeMap;
6
+
3 7
 /**
4 8
  * Created by leon on 1/23/18.
5 9
  */
6 10
 public class PhoneBook {
11
+    public static void main (String[] args){
12
+
13
+    }
14
+
15
+
16
+    private Map<String, ArrayList<String>> directory;
17
+
18
+    public PhoneBook (){
19
+        directory= new TreeMap< String, ArrayList<String>>();
20
+
21
+    }
22
+    public  void setValues(String name, ArrayList<String>phonenumber){
23
+        this.directory.put(name, phonenumber);
24
+    }
25
+
26
+
27
+    public boolean hasEntry(String name) {
28
+
29
+return directory.containsKey(name);
30
+
31
+}
32
+
33
+    public void add(String name, String number) {
34
+        ArrayList<String> contact = new ArrayList<>();
35
+        contact.add(number);
36
+        directory.put(name,contact);
37
+
38
+    }
39
+
40
+
41
+
42
+    public ArrayList<String> getContact(String name) {
43
+         return directory.get(name);
44
+     }
45
+     public String reverseLookUp(String number){
46
+        String repply= "Not here";
47
+        for (String name:directory.keySet()){
48
+            ArrayList<String> reverse= directory.get(name);
49
+            for (String looking: reverse){
50
+                if (looking.equals(number)){
51
+                     repply= name;
52
+                }
53
+            }
54
+        }
55
+        return repply;
56
+     }
57
+
58
+     public  void  remove (String name){
59
+        if (directory.containsKey(name)){
60
+            directory.remove(name);
61
+        }
62
+     }
63
+
64
+    public String listNameAndNumbers() {
65
+        StringBuilder builder = new StringBuilder();
66
+        for (String name:directory.keySet()){
67
+            for (int i= 0; i< directory.get(name).size(); i++){
68
+                builder.append(name + " " + directory.get(name).get(i) + "\n");
69
+            }
70
+        }
71
+        return builder.toString();
72
+    }
73
+
74
+
75
+    public Map<String, ArrayList<String>> getDirectory() {
76
+        return directory;
77
+    }
78
+    public Map<String, ArrayList<String>> getContact() {
79
+        return directory;
80
+    }
81
+
82
+
83
+    public void setDirectory(Map<String, ArrayList<String>> directory) {
84
+        this.directory = directory;
85
+    }
86
+
87
+
88
+
7 89
 }

+ 28
- 7
README.md Voir le fichier

@@ -1,4 +1,8 @@
1
+<<<<<<< HEAD
2
+# PhoneBook Lab:
3
+======= *
1 4
 # PhoneBook Lab
5
+>>>>>>> d733dda8f1c8fa4008665b34e3b9ea662b261d6d
2 6
 
3 7
 Write the classes needed to implement a very simple PhoneBook. 
4 8
 
@@ -20,6 +24,11 @@ Write the classes needed to implement a very simple PhoneBook.
20 24
 
21 25
 ### Building a basic `PhoneBook` class
22 26
 
27
+<<<<<<< HEAD
28
+### Building a basic `PhoneBook` class
29
+
30
+=======
31
+>>>>>>> d733dda8f1c8fa4008665b34e3b9ea662b261d6d
23 32
 ![PhoneBookDesign](./PhoneBookUML.png)
24 33
 
25 34
 In this diagram, C stands for Class, f stands for field, and m stands for method.
@@ -32,36 +41,48 @@ So, it can give you a specification for the class and the things it needs to do.
32 41
 
33 42
 * Your PhoneBook class should have the following method
34 43
 
44
+    * hasEntry(String name)
45
+        * given a name, return true if there is an entry with that name, false otherwise
35 46
 	* `add(String name, String phoneNumber)`
36 47
 		* adds an entry to the composite associate data type
37
-	* `remove(String name)`
38
-		* removes an entry to the composite associate data type
39 48
 	* `lookup(String name)`
40 49
 		* returns a phone number for the respective input `name`
41
-
50
+	* `remove(String name)`
51
+		* removes an entry to the composite associate data type
42 52
 	* `reverseLookup(String phoneNumber)`
43 53
 		* returns a name for the respective input `phoneNumber`
54
+<<<<<<< HEAD
55
+	* `listNamesAndNumbers()`
56
+		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
57
+		* Format should be `[name] [phone number]`
58
+
59
+=======
44 60
 	* `toString()`
45 61
 		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
62
+>>>>>>> d733dda8f1c8fa4008665b34e3b9ea662b261d6d
46 63
 
47 64
 	   * Sample Script
48
-	
65
+
49 66
 		   ```java
50 67
 		   PhoneBook phoneBook = new PhoneBook();
51 68
 		   phoneBook.add("Zebra", "111-222-333");
52 69
 		   phoneBook.add("Dog", "222-444-4444");
70
+<<<<<<< HEAD
71
+		   phoneBook.listNamesAndNumbers();
72
+=======
53 73
 		   
54 74
            String entries = phoneBook.toString(); 
55 75
            System.out.println(entries);
76
+>>>>>>> d733dda8f1c8fa4008665b34e3b9ea662b261d6d
56 77
 		   ```
57
-	
78
+
58 79
 	   * Sample Output
59
-	
80
+
60 81
 		   ```
61 82
 			Dog 222-444-4444
62 83
 			Zebra 111-222-333
63 84
 		   ```
64
-      
85
+
65 86
 
66 87
 ### Implementing Many-PhoneNumbers-To-One-Person Relationship
67 88
 

+ 16
- 0
phonebook.iml Voir le fichier

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

+ 36
- 0
pom.xml Voir le fichier

@@ -0,0 +1,36 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>com.zipcodewilmington</groupId>
8
+    <artifactId>phonebook</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <properties>
11
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
13
+        <java.version>1.8</java.version>
14
+    </properties>
15
+    <build>
16
+        <plugins>
17
+            <plugin>
18
+                <groupId>org.apache.maven.plugins</groupId>
19
+                <artifactId>maven-compiler-plugin</artifactId>
20
+                <configuration>
21
+                    <source>1.8</source>
22
+                    <target>1.8</target>
23
+                </configuration>
24
+            </plugin>
25
+        </plugins>
26
+    </build>
27
+    <dependencies>
28
+        <dependency>
29
+            <groupId>junit</groupId>
30
+            <artifactId>junit</artifactId>
31
+            <version>4.12</version>
32
+            <scope>test</scope>
33
+        </dependency>
34
+    </dependencies>
35
+
36
+</project>

+ 106
- 0
src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java Voir le fichier

@@ -0,0 +1,106 @@
1
+package com.zipcodewilmington.phonebook;
2
+import org.junit.Assert;
3
+import org.junit.Test;
4
+
5
+import java.util.ArrayList;
6
+
7
+/**
8
+ * Created by leon on 1/23/18.
9
+ */
10
+public class PhoneBookTest {
11
+
12
+    @Test
13
+     public void hasEntrytest  ()  {
14
+        PhoneBook info = new PhoneBook();
15
+        String name = "Nuridalia";
16
+        String number= "267-363-8738";
17
+        info.add(name, number);
18
+
19
+        //when
20
+
21
+    boolean actualOutput= info.hasEntry(name);
22
+
23
+
24
+        Assert.assertTrue(actualOutput);
25
+
26
+
27
+    }
28
+
29
+
30
+    @Test
31
+    public void addEntrytest  ()  {
32
+        PhoneBook info = new PhoneBook();
33
+        String name = "Nuridalia";
34
+        String number= "267-363-8738";
35
+        info.add(name, number);
36
+
37
+        //when
38
+
39
+        Assert.assertEquals(1, info.getContact().size());
40
+
41
+
42
+    }
43
+    @Test
44
+    public void getContactTest(){
45
+        PhoneBook info = new PhoneBook();
46
+        String name= "Nuridalia";
47
+        String number= "267-777-9999";
48
+        info.add(name , number);
49
+
50
+        String expected= number;
51
+        ArrayList<String> actual= info.getContact(number);
52
+    }
53
+
54
+
55
+
56
+    @Test
57
+    public  void removeTest (){
58
+
59
+        PhoneBook info = new PhoneBook();
60
+        String name = "Nuridalia";
61
+        String number = "267-777-9999";
62
+        info.add(name, number);
63
+        info.remove(name);
64
+
65
+        boolean actual = info.hasEntry(name);
66
+        boolean expected = true;
67
+        Assert.assertFalse(actual);
68
+
69
+
70
+    }
71
+
72
+
73
+    @Test
74
+    public void  reverseLookupTest(){
75
+        PhoneBook info =new PhoneBook();
76
+        String name= "Evangelina";
77
+        String number = "267-999-8888";
78
+        info.add(name, number);
79
+
80
+        String actual= info.reverseLookUp(number);
81
+        String expected = name;
82
+
83
+
84
+        Assert.assertEquals(expected, actual);
85
+
86
+
87
+    }
88
+
89
+
90
+    @Test
91
+    public  void listNamesAndNumbers(){
92
+        PhoneBook info = new PhoneBook ();
93
+        info.add("Eva", "999-999-999");
94
+        info.add("nury", "888-999-8787");
95
+        info. add ("Dayhani", "888-777-9090");
96
+
97
+        String actual= info.listNameAndNumbers();
98
+        String expected= "Dayhani 888-777-9090\nEva 999-999-999\nnury 888-999-8787\n";
99
+
100
+        Assert.assertEquals(expected,actual);
101
+
102
+
103
+
104
+
105
+    }
106
+}