Aleena Rose-Mathew 6 years ago
parent
commit
4ccfd615cd

BIN
.DS_Store View File


+ 0
- 25
.gitignore View File

@@ -1,25 +0,0 @@
1
-# ---> Java
2
-# Compiled class file
3
-*.class
4
-
5
-# Log file
6
-*.log
7
-
8
-# BlueJ files
9
-*.ctxt
10
-
11
-# Mobile Tools for Java (J2ME)
12
-.mtj.tmp/
13
-
14
-# Package Files #
15
-*.jar
16
-*.war
17
-*.ear
18
-*.zip
19
-*.tar.gz
20
-*.rar
21
-
22
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23
-hs_err_pid*
24
-
25
-.DS_Store

+ 12
- 0
.idea/ZCW-PhoneBook.iml View File

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$">
6
+      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
7
+      <sourceFolder url="file://$MODULE_DIR$/.idea" isTestSource="false" />
8
+    </content>
9
+    <orderEntry type="inheritedJdk" />
10
+    <orderEntry type="sourceFolder" forTests="false" />
11
+  </component>
12
+</module>

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

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <bytecodeTargetLevel target="8" />
5
+  </component>
6
+</project>

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

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
7
+</project>

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

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

+ 124
- 0
.idea/uiDesigner.xml View File

@@ -0,0 +1,124 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Palette2">
4
+    <group name="Swing">
5
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
6
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
7
+      </item>
8
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
9
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
10
+      </item>
11
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
12
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
13
+      </item>
14
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
15
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
16
+      </item>
17
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
18
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
19
+        <initial-values>
20
+          <property name="text" value="Button" />
21
+        </initial-values>
22
+      </item>
23
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
24
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
25
+        <initial-values>
26
+          <property name="text" value="RadioButton" />
27
+        </initial-values>
28
+      </item>
29
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
30
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
31
+        <initial-values>
32
+          <property name="text" value="CheckBox" />
33
+        </initial-values>
34
+      </item>
35
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
36
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
37
+        <initial-values>
38
+          <property name="text" value="Label" />
39
+        </initial-values>
40
+      </item>
41
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
42
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
43
+          <preferred-size width="150" height="-1" />
44
+        </default-constraints>
45
+      </item>
46
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
47
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
48
+          <preferred-size width="150" height="-1" />
49
+        </default-constraints>
50
+      </item>
51
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
52
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
53
+          <preferred-size width="150" height="-1" />
54
+        </default-constraints>
55
+      </item>
56
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
57
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
58
+          <preferred-size width="150" height="50" />
59
+        </default-constraints>
60
+      </item>
61
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
62
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
63
+          <preferred-size width="150" height="50" />
64
+        </default-constraints>
65
+      </item>
66
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
67
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
68
+          <preferred-size width="150" height="50" />
69
+        </default-constraints>
70
+      </item>
71
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
72
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
73
+      </item>
74
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
75
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
76
+          <preferred-size width="150" height="50" />
77
+        </default-constraints>
78
+      </item>
79
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
80
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
81
+          <preferred-size width="150" height="50" />
82
+        </default-constraints>
83
+      </item>
84
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
85
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
86
+          <preferred-size width="150" height="50" />
87
+        </default-constraints>
88
+      </item>
89
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
90
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
91
+          <preferred-size width="200" height="200" />
92
+        </default-constraints>
93
+      </item>
94
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
95
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
96
+          <preferred-size width="200" height="200" />
97
+        </default-constraints>
98
+      </item>
99
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
100
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
101
+      </item>
102
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
103
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
104
+      </item>
105
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
106
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
107
+      </item>
108
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
109
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
110
+      </item>
111
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
112
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
113
+          <preferred-size width="-1" height="20" />
114
+        </default-constraints>
115
+      </item>
116
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
117
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
118
+      </item>
119
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
120
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
121
+      </item>
122
+    </group>
123
+  </component>
124
+</project>

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

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

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

@@ -0,0 +1,504 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="64f7d87e-9906-4f3f-848a-b72ce4aedc19" name="Default" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/Test/PhonebookTest.java" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/src/PhoneBook.java" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/src/PhoneBookTest.java" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/src/package-info.java" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/src/package.bluej" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/src/.gitignore" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/PhoneBook.java" beforeDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/PhoneBookTest.java" beforeDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/PhoneBookUML.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/PhoneBookUML.png" afterDir="false" />
17
+      <change beforePath="$PROJECT_DIR$/package.bluej" beforeDir="false" />
18
+    </list>
19
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
20
+    <option name="TRACKING_ENABLED" value="true" />
21
+    <option name="SHOW_DIALOG" value="false" />
22
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
23
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
24
+    <option name="LAST_RESOLUTION" value="IGNORE" />
25
+  </component>
26
+  <component name="FileEditorManager">
27
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
28
+      <file leaf-file-name="PhonebookTest.java" pinned="false" current-in-tab="false">
29
+        <entry file="file://$PROJECT_DIR$/Test/PhonebookTest.java">
30
+          <provider selected="true" editor-type-id="text-editor">
31
+            <state relative-caret-position="15">
32
+              <caret line="1" selection-start-line="1" selection-end-line="1" />
33
+            </state>
34
+          </provider>
35
+        </entry>
36
+      </file>
37
+      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
38
+        <entry file="file://$PROJECT_DIR$/pom.xml">
39
+          <provider selected="true" editor-type-id="text-editor">
40
+            <state relative-caret-position="270">
41
+              <caret line="18" column="10" selection-start-line="18" selection-start-column="10" selection-end-line="18" selection-end-column="10" />
42
+            </state>
43
+          </provider>
44
+        </entry>
45
+      </file>
46
+      <file leaf-file-name="PhoneBook.java" pinned="false" current-in-tab="false">
47
+        <entry file="file://$PROJECT_DIR$/src/PhoneBook.java">
48
+          <provider selected="true" editor-type-id="text-editor">
49
+            <state relative-caret-position="90">
50
+              <caret line="6" column="47" selection-start-line="6" selection-start-column="47" selection-end-line="6" selection-end-column="47" />
51
+              <folding>
52
+                <element signature="e#172#173#0" expanded="true" />
53
+                <element signature="e#232#233#0" expanded="true" />
54
+              </folding>
55
+            </state>
56
+          </provider>
57
+        </entry>
58
+      </file>
59
+      <file leaf-file-name="PhoneBookTest.java" pinned="false" current-in-tab="false">
60
+        <entry file="file://$PROJECT_DIR$/src/PhoneBookTest.java">
61
+          <provider selected="true" editor-type-id="text-editor">
62
+            <state relative-caret-position="30">
63
+              <caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
64
+            </state>
65
+          </provider>
66
+        </entry>
67
+      </file>
68
+      <file leaf-file-name="PhoneBook.class" pinned="false" current-in-tab="true">
69
+        <entry file="file://$PROJECT_DIR$/src/PhoneBook.class">
70
+          <provider selected="true" editor-type-id="text-editor">
71
+            <state relative-caret-position="327">
72
+              <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
73
+            </state>
74
+          </provider>
75
+        </entry>
76
+      </file>
77
+    </leaf>
78
+  </component>
79
+  <component name="FileTemplateManagerImpl">
80
+    <option name="RECENT_TEMPLATES">
81
+      <list>
82
+        <option value="Class" />
83
+        <option value="package-info" />
84
+      </list>
85
+    </option>
86
+  </component>
87
+  <component name="Git.Settings">
88
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
89
+  </component>
90
+  <component name="IdeDocumentHistory">
91
+    <option name="CHANGED_PATHS">
92
+      <list>
93
+        <option value="$PROJECT_DIR$/PhoneBook.java" />
94
+        <option value="$PROJECT_DIR$/Test/addTest.java" />
95
+        <option value="$PROJECT_DIR$/Test/PhonebookTest.java" />
96
+        <option value="$PROJECT_DIR$/src/PhoneBook.java" />
97
+        <option value="$PROJECT_DIR$/src/PhoneBookTest.java" />
98
+      </list>
99
+    </option>
100
+  </component>
101
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
102
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
103
+  <component name="JsGulpfileManager">
104
+    <detection-done>true</detection-done>
105
+    <sorting>DEFINITION_ORDER</sorting>
106
+  </component>
107
+  <component name="MavenImportPreferences">
108
+    <option name="generalSettings">
109
+      <MavenGeneralSettings>
110
+        <option name="mavenHome" value="$APPLICATION_HOME_DIR$/plugins/maven/lib/maven3" />
111
+      </MavenGeneralSettings>
112
+    </option>
113
+  </component>
114
+  <component name="NodePackageJsonFileManager">
115
+    <packageJsonPaths />
116
+  </component>
117
+  <component name="ProjectFrameBounds" fullScreen="true">
118
+    <option name="y" value="23" />
119
+    <option name="width" value="956" />
120
+    <option name="height" value="716" />
121
+  </component>
122
+  <component name="ProjectLevelVcsManager">
123
+    <ConfirmationsSetting value="2" id="Add" />
124
+  </component>
125
+  <component name="ProjectView">
126
+    <navigator proportions="" version="1">
127
+      <foldersAlwaysOnTop value="true" />
128
+    </navigator>
129
+    <panes>
130
+      <pane id="PackagesPane" />
131
+      <pane id="ProjectPane">
132
+        <subPane>
133
+          <expand>
134
+            <path>
135
+              <item name="ZCW-PhoneBook" type="b2602c69:ProjectViewProjectNode" />
136
+              <item name="ZCW-PhoneBook" type="462c0819:PsiDirectoryNode" />
137
+            </path>
138
+            <path>
139
+              <item name="ZCW-PhoneBook" type="b2602c69:ProjectViewProjectNode" />
140
+              <item name="ZCW-PhoneBook" type="462c0819:PsiDirectoryNode" />
141
+              <item name=".idea" type="462c0819:PsiDirectoryNode" />
142
+            </path>
143
+            <path>
144
+              <item name="ZCW-PhoneBook" type="b2602c69:ProjectViewProjectNode" />
145
+              <item name="ZCW-PhoneBook" type="462c0819:PsiDirectoryNode" />
146
+              <item name="src" type="462c0819:PsiDirectoryNode" />
147
+            </path>
148
+            <path>
149
+              <item name="ZCW-PhoneBook" type="b2602c69:ProjectViewProjectNode" />
150
+              <item name="ZCW-PhoneBook" type="462c0819:PsiDirectoryNode" />
151
+              <item name="Test" type="462c0819:PsiDirectoryNode" />
152
+            </path>
153
+          </expand>
154
+          <select />
155
+        </subPane>
156
+      </pane>
157
+      <pane id="Scope" />
158
+      <pane id="AndroidView" />
159
+    </panes>
160
+  </component>
161
+  <component name="PropertiesComponent">
162
+    <property name="WebServerToolWindowFactoryState" value="false" />
163
+    <property name="aspect.path.notification.shown" value="true" />
164
+    <property name="create.test.in.the.same.root" value="true" />
165
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
166
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
167
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
168
+    <property name="project.structure.last.edited" value="Modules" />
169
+    <property name="project.structure.proportion" value="0.15" />
170
+    <property name="project.structure.side.proportion" value="0.2" />
171
+    <property name="settings.editor.selected.configurable" value="MavenSettings" />
172
+  </component>
173
+  <component name="RecentsManager">
174
+    <key name="MoveFile.RECENT_KEYS">
175
+      <recent name="$PROJECT_DIR$/src" />
176
+    </key>
177
+    <key name="CopyFile.RECENT_KEYS">
178
+      <recent name="$PROJECT_DIR$" />
179
+    </key>
180
+  </component>
181
+  <component name="RunDashboard">
182
+    <option name="ruleStates">
183
+      <list>
184
+        <RuleState>
185
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
186
+        </RuleState>
187
+        <RuleState>
188
+          <option name="name" value="StatusDashboardGroupingRule" />
189
+        </RuleState>
190
+      </list>
191
+    </option>
192
+  </component>
193
+  <component name="RunManager">
194
+    <configuration default="true" type="Application" factoryName="Application">
195
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
196
+    </configuration>
197
+    <configuration default="true" type="JUnit" factoryName="JUnit">
198
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
199
+      <option name="ALTERNATIVE_JRE_PATH" />
200
+      <option name="PACKAGE_NAME" />
201
+      <option name="MAIN_CLASS_NAME" />
202
+      <option name="METHOD_NAME" />
203
+      <option name="TEST_OBJECT" value="class" />
204
+      <option name="VM_PARAMETERS" value="-ea" />
205
+      <option name="PARAMETERS" />
206
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
207
+      <option name="PASS_PARENT_ENVS" value="true" />
208
+      <option name="TEST_SEARCH_SCOPE">
209
+        <value defaultName="singleModule" />
210
+      </option>
211
+      <patterns />
212
+    </configuration>
213
+    <configuration default="true" type="TestNG" factoryName="TestNG">
214
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
215
+      <option name="ALTERNATIVE_JRE_PATH" />
216
+      <option name="SUITE_NAME" />
217
+      <option name="PACKAGE_NAME" />
218
+      <option name="MAIN_CLASS_NAME" />
219
+      <option name="METHOD_NAME" />
220
+      <option name="GROUP_NAME" />
221
+      <option name="TEST_OBJECT" value="CLASS" />
222
+      <option name="VM_PARAMETERS" value="-ea" />
223
+      <option name="PARAMETERS" />
224
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
225
+      <option name="OUTPUT_DIRECTORY" />
226
+      <option name="PASS_PARENT_ENVS" value="true" />
227
+      <option name="TEST_SEARCH_SCOPE">
228
+        <value defaultName="singleModule" />
229
+      </option>
230
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
231
+      <option name="PROPERTIES_FILE" />
232
+      <properties />
233
+      <listeners />
234
+    </configuration>
235
+  </component>
236
+  <component name="SvnConfiguration">
237
+    <configuration />
238
+  </component>
239
+  <component name="TaskManager">
240
+    <task active="true" id="Default" summary="Default task">
241
+      <changelist id="64f7d87e-9906-4f3f-848a-b72ce4aedc19" name="Default" comment="" />
242
+      <created>1529978711703</created>
243
+      <option name="number" value="Default" />
244
+      <option name="presentableId" value="Default" />
245
+      <updated>1529978711703</updated>
246
+      <workItem from="1529978713130" duration="3978000" />
247
+      <workItem from="1530046309709" duration="736000" />
248
+      <workItem from="1530082477187" duration="230000" />
249
+    </task>
250
+    <servers />
251
+  </component>
252
+  <component name="TimeTrackingManager">
253
+    <option name="totallyTimeSpent" value="4944000" />
254
+  </component>
255
+  <component name="ToolWindowManager">
256
+    <frame x="0" y="0" width="1280" height="800" extended-state="0" />
257
+    <editor active="true" />
258
+    <layout>
259
+      <window_info anchor="right" id="Palette" order="3" />
260
+      <window_info anchor="bottom" id="TODO" order="6" />
261
+      <window_info anchor="right" id="Palette&#9;" order="3" />
262
+      <window_info id="Image Layers" order="2" />
263
+      <window_info anchor="right" id="Capture Analysis" order="3" />
264
+      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" visible="true" weight="0.11586207" />
265
+      <window_info anchor="right" id="Maven Projects" order="3" />
266
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
267
+      <window_info anchor="bottom" id="Run" order="2" />
268
+      <window_info anchor="bottom" id="Version Control" order="7" />
269
+      <window_info anchor="bottom" id="Terminal" order="7" />
270
+      <window_info id="Capture Tool" order="2" />
271
+      <window_info id="Designer" order="2" />
272
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25767368" />
273
+      <window_info anchor="right" id="Database" order="3" />
274
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
275
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
276
+      <window_info id="UI Designer" order="2" />
277
+      <window_info anchor="right" id="Theme Preview" order="3" />
278
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
279
+      <window_info id="Favorites" order="2" side_tool="true" />
280
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
281
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
282
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
283
+      <window_info anchor="bottom" id="Message" order="0" />
284
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
285
+      <window_info anchor="bottom" id="Find" order="1" />
286
+    </layout>
287
+  </component>
288
+  <component name="TypeScriptGeneratedFilesManager">
289
+    <option name="version" value="1" />
290
+  </component>
291
+  <component name="VcsContentAnnotationSettings">
292
+    <option name="myLimit" value="2678400000" />
293
+  </component>
294
+  <component name="editorHistoryManager">
295
+    <entry file="file://$PROJECT_DIR$/Test/PhonebookTest.java">
296
+      <provider selected="true" editor-type-id="text-editor">
297
+        <state relative-caret-position="15">
298
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
299
+        </state>
300
+      </provider>
301
+    </entry>
302
+    <entry file="file://$PROJECT_DIR$/pom.xml">
303
+      <provider selected="true" editor-type-id="text-editor">
304
+        <state relative-caret-position="270">
305
+          <caret line="18" column="10" selection-start-line="18" selection-start-column="10" selection-end-line="18" selection-end-column="10" />
306
+        </state>
307
+      </provider>
308
+    </entry>
309
+    <entry file="file://$PROJECT_DIR$/src/PhoneBook.java">
310
+      <provider selected="true" editor-type-id="text-editor">
311
+        <state relative-caret-position="90">
312
+          <caret line="6" column="47" selection-start-line="6" selection-start-column="47" selection-end-line="6" selection-end-column="47" />
313
+          <folding>
314
+            <element signature="e#172#173#0" expanded="true" />
315
+            <element signature="e#232#233#0" expanded="true" />
316
+          </folding>
317
+        </state>
318
+      </provider>
319
+    </entry>
320
+    <entry file="file://$PROJECT_DIR$/src/PhoneBookTest.java">
321
+      <provider selected="true" editor-type-id="text-editor">
322
+        <state relative-caret-position="30">
323
+          <caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
324
+        </state>
325
+      </provider>
326
+    </entry>
327
+    <entry file="file://$PROJECT_DIR$/src/PhoneBook.class">
328
+      <provider selected="true" editor-type-id="text-editor">
329
+        <state relative-caret-position="315">
330
+          <caret line="21" column="42" lean-forward="true" selection-start-line="21" selection-start-column="42" selection-end-line="21" selection-end-column="42" />
331
+        </state>
332
+      </provider>
333
+    </entry>
334
+    <entry file="file://$PROJECT_DIR$/Test/PhonebookTest.java">
335
+      <provider selected="true" editor-type-id="text-editor">
336
+        <state relative-caret-position="15">
337
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
338
+        </state>
339
+      </provider>
340
+    </entry>
341
+    <entry file="file://$PROJECT_DIR$/pom.xml">
342
+      <provider selected="true" editor-type-id="text-editor">
343
+        <state relative-caret-position="270">
344
+          <caret line="18" column="10" selection-start-line="18" selection-start-column="10" selection-end-line="18" selection-end-column="10" />
345
+        </state>
346
+      </provider>
347
+    </entry>
348
+    <entry file="file://$PROJECT_DIR$/src/PhoneBookTest.java">
349
+      <provider selected="true" editor-type-id="text-editor">
350
+        <state relative-caret-position="165">
351
+          <caret line="14" column="13" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
352
+        </state>
353
+      </provider>
354
+    </entry>
355
+    <entry file="file://$PROJECT_DIR$/src/PhoneBook.java">
356
+      <provider selected="true" editor-type-id="text-editor">
357
+        <state relative-caret-position="285">
358
+          <caret line="19" column="32" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="32" />
359
+          <folding>
360
+            <element signature="e#172#173#0" expanded="true" />
361
+            <element signature="e#232#233#0" expanded="true" />
362
+          </folding>
363
+        </state>
364
+      </provider>
365
+    </entry>
366
+    <entry file="file://$PROJECT_DIR$/src/package-info.java">
367
+      <provider selected="true" editor-type-id="text-editor" />
368
+    </entry>
369
+    <entry file="file://$PROJECT_DIR$/Test/PhonebookTest.java">
370
+      <provider selected="true" editor-type-id="text-editor">
371
+        <state relative-caret-position="15">
372
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
373
+        </state>
374
+      </provider>
375
+    </entry>
376
+    <entry file="file://$PROJECT_DIR$/README.md">
377
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
378
+        <state split_layout="SPLIT">
379
+          <first_editor />
380
+          <second_editor />
381
+        </state>
382
+      </provider>
383
+    </entry>
384
+    <entry file="file://$PROJECT_DIR$/pom.xml">
385
+      <provider selected="true" editor-type-id="text-editor">
386
+        <state relative-caret-position="270">
387
+          <caret line="18" column="10" selection-start-line="18" selection-start-column="10" selection-end-line="18" selection-end-column="10" />
388
+        </state>
389
+      </provider>
390
+    </entry>
391
+    <entry file="file://$PROJECT_DIR$/src/PhoneBook.java">
392
+      <provider selected="true" editor-type-id="text-editor">
393
+        <state relative-caret-position="90">
394
+          <caret line="6" column="47" selection-start-line="6" selection-start-column="47" selection-end-line="6" selection-end-column="47" />
395
+          <folding>
396
+            <element signature="e#172#173#0" expanded="true" />
397
+            <element signature="e#232#233#0" expanded="true" />
398
+          </folding>
399
+        </state>
400
+      </provider>
401
+    </entry>
402
+    <entry file="file://$PROJECT_DIR$/src/PhoneBookTest.java">
403
+      <provider selected="true" editor-type-id="text-editor">
404
+        <state relative-caret-position="30">
405
+          <caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
406
+        </state>
407
+      </provider>
408
+    </entry>
409
+    <entry file="file://$PROJECT_DIR$/src/PhoneBook.class">
410
+      <provider selected="true" editor-type-id="text-editor">
411
+        <state relative-caret-position="327">
412
+          <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
413
+        </state>
414
+      </provider>
415
+    </entry>
416
+  </component>
417
+  <component name="masterDetails">
418
+    <states>
419
+      <state key="ArtifactsStructureConfigurable.UI">
420
+        <settings>
421
+          <artifact-editor />
422
+          <splitter-proportions>
423
+            <option name="proportions">
424
+              <list>
425
+                <option value="0.2" />
426
+              </list>
427
+            </option>
428
+          </splitter-proportions>
429
+        </settings>
430
+      </state>
431
+      <state key="FacetStructureConfigurable.UI">
432
+        <settings>
433
+          <last-edited>No facets are configured</last-edited>
434
+          <splitter-proportions>
435
+            <option name="proportions">
436
+              <list>
437
+                <option value="0.2" />
438
+              </list>
439
+            </option>
440
+          </splitter-proportions>
441
+        </settings>
442
+      </state>
443
+      <state key="GlobalLibrariesConfigurable.UI">
444
+        <settings>
445
+          <splitter-proportions>
446
+            <option name="proportions">
447
+              <list>
448
+                <option value="0.2" />
449
+              </list>
450
+            </option>
451
+          </splitter-proportions>
452
+        </settings>
453
+      </state>
454
+      <state key="JdkListConfigurable.UI">
455
+        <settings>
456
+          <last-edited>1.8</last-edited>
457
+          <splitter-proportions>
458
+            <option name="proportions">
459
+              <list>
460
+                <option value="0.2" />
461
+              </list>
462
+            </option>
463
+          </splitter-proportions>
464
+        </settings>
465
+      </state>
466
+      <state key="ModuleStructureConfigurable.UI">
467
+        <settings>
468
+          <last-edited>ZCW-PhoneBook</last-edited>
469
+          <splitter-proportions>
470
+            <option name="proportions">
471
+              <list>
472
+                <option value="0.2" />
473
+                <option value="0.6" />
474
+              </list>
475
+            </option>
476
+          </splitter-proportions>
477
+        </settings>
478
+      </state>
479
+      <state key="ProjectJDKs.UI">
480
+        <settings>
481
+          <last-edited>1.8</last-edited>
482
+          <splitter-proportions>
483
+            <option name="proportions">
484
+              <list>
485
+                <option value="0.2" />
486
+              </list>
487
+            </option>
488
+          </splitter-proportions>
489
+        </settings>
490
+      </state>
491
+      <state key="ProjectLibrariesConfigurable.UI">
492
+        <settings>
493
+          <splitter-proportions>
494
+            <option name="proportions">
495
+              <list>
496
+                <option value="0.2" />
497
+              </list>
498
+            </option>
499
+          </splitter-proportions>
500
+        </settings>
501
+      </state>
502
+    </states>
503
+  </component>
504
+</project>

+ 38
- 0
PhoneBook.iml View File

@@ -0,0 +1,38 @@
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" isTestSource="false" />
8
+      <sourceFolder url="file://$MODULE_DIR$/src/Test" isTestSource="true" />
9
+      <excludeFolder url="file://$MODULE_DIR$/target" />
10
+    </content>
11
+    <orderEntry type="inheritedJdk" />
12
+    <orderEntry type="sourceFolder" forTests="false" />
13
+    <orderEntry type="module-library" scope="TEST">
14
+      <library name="JUnit4">
15
+        <CLASSES>
16
+          <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
17
+          <root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
18
+        </CLASSES>
19
+        <JAVADOC />
20
+        <SOURCES />
21
+      </library>
22
+    </orderEntry>
23
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.0.3" level="project" />
24
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.0.0" level="project" />
25
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.0.0" level="project" />
26
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.0.3" level="project" />
27
+    <orderEntry type="module-library">
28
+      <library>
29
+        <CLASSES>
30
+          <root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
31
+          <root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
32
+        </CLASSES>
33
+        <JAVADOC />
34
+        <SOURCES />
35
+      </library>
36
+    </orderEntry>
37
+  </component>
38
+</module>

+ 0
- 7
PhoneBook.java View File

@@ -1,7 +0,0 @@
1
- 
2
-
3
-/**
4
- * Created by leon on 1/23/18.
5
- */
6
-public class PhoneBook {
7
-}

+ 0
- 42
PhoneBookTest.java View File

@@ -1,42 +0,0 @@
1
-
2
-
3
-import static org.junit.Assert.*;
4
-import org.junit.After;
5
-import org.junit.Before;
6
-import org.junit.Test;
7
-
8
-/**
9
- * The test class PhoneBookTest.
10
- *
11
- * @author  (your name)
12
- * @version (a version number or a date)
13
- */
14
-public class PhoneBookTest
15
-{
16
-    /**
17
-     * Default constructor for test class PhoneBookTest
18
-     */
19
-    public PhoneBookTest()
20
-    {
21
-    }
22
-
23
-    /**
24
-     * Sets up the test fixture.
25
-     *
26
-     * Called before every test case method.
27
-     */
28
-    @Before
29
-    public void setUp()
30
-    {
31
-    }
32
-
33
-    /**
34
-     * Tears down the test fixture.
35
-     *
36
-     * Called after every test case method.
37
-     */
38
-    @After
39
-    public void tearDown()
40
-    {
41
-    }
42
-}

BIN
PhoneBookUML.png View File


+ 0
- 1
README.TXT View File

@@ -1 +0,0 @@
1
-Look at README.md

+ 0
- 63
README.md View File

@@ -1,63 +0,0 @@
1
-# Holding Objects Lab:
2
-
3
-* Fork and clone this repository to complete your lab. Submit each part with a Pull Request for a separate branch.
4
-
5
-## Unit Tests
6
-
7
-* You are expected to write unit tests for your code.
8
-* Be sure to write the tests before implementing the functionality being tested.
9
-* Tests must be thorough and address all possible paths through each method.
10
-
11
-## Submission
12
-
13
-* Your completed lab must be submitted via GitHub.
14
-* Labs are not complete unless they include UML diagrams of all implemented classes, as well as unit tests for all features.
15
-
16
-## Instructions:
17
-
18
-### Building a basic `PhoneBook` class
19
-
20
-<img src = "./PhoneBookUML.png">
21
-
22
-* Create a `PhoneBook` class that holds names and phone numbers.
23
-* You can use an [associative data type](https://en.wikipedia.org/wiki/Associative_array) (one which stores items as keys paired with values).
24
-* **Hint:** You should use a sorted map.
25
-
26
-
27
-* Your PhoneBook class should have the following method
28
-
29
-	* `add(String name, String phoneNumber)`
30
-		* adds an entry to the composite associate data type
31
-	* `remove(String name)`
32
-		* removes an entry to the composite associate data type
33
-	* `lookup(String name)`
34
-		* returns a phone number for the respective input `name`
35
-
36
-	* `reverseLookup(String phoneNumber)`
37
-		* returns a name for the respective input `phoneNumber`
38
-	* `display()`
39
-		* print a human-readable list of all entries (names and phone numbers) in alphabetical order.
40
-
41
-	   * Sample Script
42
-	
43
-		   ```java
44
-		   PhoneBook phoneBook = new PhoneBook();
45
-		   phoneBook.add("Zebra", "111-222-333");
46
-		   phoneBook.add("Dog", "222-444-4444");
47
-		   phoneBook.display(); 
48
-		   ```
49
-	
50
-	   * Sample Output
51
-	
52
-		   ```
53
-			Dog 222-444-4444
54
-			Zebra 111-222-333
55
-		   ```
56
-      
57
-
58
-### Implementing Many-PhoneNumbers-To-One-Person Relationship
59
-
60
-* [Some people have more than one](https://en.wikipedia.org/wiki/One-to-many_(data_model)) phone number.
61
-* Refactor your `PhoneBook` class to map names to lists of phone numbers.
62
-* You should modify your `add()` and `remove()` methods to handle adding or removing individual numbers
63
-* Create a `removeRecord` method for removing an entire entry from your PhoneBook.

+ 0
- 26
package.bluej View File

@@ -1,26 +0,0 @@
1
-#BlueJ package file
2
-editor.fx.0.height=0
3
-editor.fx.0.width=0
4
-editor.fx.0.x=0
5
-editor.fx.0.y=0
6
-objectbench.height=101
7
-objectbench.width=461
8
-package.divider.horizontal=0.6
9
-package.divider.vertical=0.8007380073800738
10
-package.editor.height=427
11
-package.editor.width=674
12
-package.editor.x=427
13
-package.editor.y=143
14
-package.frame.height=600
15
-package.frame.width=800
16
-package.numDependencies=0
17
-package.numTargets=1
18
-package.showExtends=true
19
-package.showUses=true
20
-project.charset=UTF-8
21
-readme.height=58
22
-readme.name=@README
23
-readme.width=47
24
-readme.x=10
25
-readme.y=10
26
-

+ 32
- 0
pom.xml View File

@@ -0,0 +1,32 @@
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.zipcoder</groupId>
8
+    <artifactId>PhoneBook</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <build>
11
+        <plugins>
12
+            <plugin>
13
+                <groupId>org.apache.maven.plugins</groupId>
14
+                <artifactId>maven-compiler-plugin</artifactId>
15
+                <configuration>
16
+                    <source>8</source>
17
+                    <target>8</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
22
+    <dependencies>
23
+        <dependency>
24
+            <groupId>org.junit.jupiter</groupId>
25
+            <artifactId>junit-jupiter-api</artifactId>
26
+            <version>5.0.3</version>
27
+            <scope>test</scope>
28
+        </dependency>
29
+    </dependencies>
30
+
31
+
32
+</project>

BIN
src/.DS_Store View File


BIN
src/com/.DS_Store View File


+ 78
- 0
src/com/company/PhoneBook.java View File

@@ -0,0 +1,78 @@
1
+package com.company;
2
+
3
+import java.util.*;
4
+
5
+public class PhoneBook {
6
+
7
+    TreeMap<String,List<String>> contacts=new TreeMap<String, List<String>>();
8
+
9
+    public PhoneBook() {
10
+    }
11
+
12
+    public void add(String name, String phoneNumber) {
13
+        boolean result=true;
14
+        if (contacts.containsKey(name)) {
15
+            this.contacts.get(name).add(phoneNumber);
16
+        } else {
17
+            ArrayList<String> phoneNumbers = new ArrayList();
18
+            phoneNumbers.add(phoneNumber);
19
+            contacts.put(name, phoneNumbers);
20
+        }
21
+    }
22
+
23
+    public void removeRecord(String name) {
24
+
25
+        for(Map.Entry<String,List<String>> i :contacts.entrySet())
26
+        {
27
+            if(i.getKey().equals(name))
28
+            {
29
+                contacts.remove(name);
30
+            }
31
+        }
32
+    }
33
+    public String display()
34
+    {
35
+        StringBuilder br=new StringBuilder();
36
+        for(Map.Entry<String,List<String>> i :contacts.entrySet())
37
+        {
38
+            br.append(i.getKey());
39
+            br.append(": ");
40
+            for(String number:i.getValue())
41
+            {
42
+                br.append(number);
43
+            }
44
+        }
45
+        return br.toString();
46
+    }
47
+    public String lookupbyName(String name) {
48
+
49
+        String result="";
50
+        for(Map.Entry<String,List<String>> i :contacts.entrySet())
51
+        {
52
+            if(i.getKey().equalsIgnoreCase(name))
53
+            {
54
+                for(String number:i.getValue())
55
+                {
56
+                    result+=number+ " ";
57
+                }
58
+            }
59
+
60
+        }
61
+        return result.trim();
62
+    }
63
+    public String reverseLookUp(String phonenumber)
64
+    {
65
+        String name="";
66
+        for(Map.Entry<String,List<String>> i :contacts.entrySet())
67
+        {
68
+            if(i.getValue().contains(phonenumber))
69
+            {
70
+                name=i.getKey();
71
+            }
72
+        }
73
+        return name;
74
+    }
75
+
76
+
77
+}
78
+

+ 50
- 0
src/com/company/PhoneBookTest.java View File

@@ -0,0 +1,50 @@
1
+package com.company;
2
+
3
+import com.company.PhoneBook;
4
+import org.junit.Assert;
5
+import org.junit.Test;
6
+
7
+
8
+import java.util.ArrayList;
9
+public class PhoneBookTest {
10
+
11
+
12
+    @Test
13
+    public void add() {
14
+        PhoneBook phoneBook=new PhoneBook();
15
+        String expected="boby: 8989898989";
16
+        phoneBook.add("boby","8989898989");
17
+        String actual=phoneBook.display();
18
+        Assert.assertEquals(actual, expected);
19
+    }
20
+
21
+    @Test
22
+    public void removeRecord() {
23
+        PhoneBook phoneBook=new PhoneBook();
24
+        phoneBook.add("boby","1234567890");
25
+        phoneBook.removeRecord("boby");
26
+        String res=phoneBook.display();
27
+        Assert.assertEquals("",res);
28
+    }
29
+
30
+    @Test
31
+    public void lookupByName() {
32
+        String expected="1234567890 8989898989";
33
+        PhoneBook phoneBook=new PhoneBook();
34
+        phoneBook.add("boby","1234567890");
35
+        phoneBook.add("boby","8989898989");
36
+        String actual=phoneBook.lookupbyName("boby");
37
+        Assert.assertEquals(expected, actual);
38
+    }
39
+    @Test
40
+    public void testreverseLookUp()
41
+    {
42
+        String expected="boby";
43
+        PhoneBook phoneBook=new PhoneBook();
44
+        phoneBook.add("boby","1234567890");
45
+        phoneBook.add("boby","8989898989");
46
+        String actual=phoneBook.reverseLookUp("1234567890");
47
+        Assert.assertEquals(expected, actual);
48
+    }
49
+
50
+}

BIN
target/classes/com/company/PhoneBook.class View File


BIN
target/classes/com/company/PhoneBookTest.class View File