Jessica Campbell 6 years ago
parent
commit
27e5ec9958

+ 7
- 0
pom.xml View File

@@ -7,6 +7,13 @@
7 7
     <groupId>com.zipcodewilmington</groupId>
8 8
     <artifactId>phonebok</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <dependency>
12
+            <groupId>junit</groupId>
13
+            <artifactId>junit</artifactId>
14
+            <version>RELEASE</version>
15
+        </dependency>
16
+    </dependencies>
10 17
 
11 18
 
12 19
 </project>

+ 28
- 1
src/main/java/com/zipcodewilmington/phonebook/PhoneBook.java View File

@@ -1,7 +1,34 @@
1 1
 package com.zipcodewilmington.phonebook;
2 2
 
3
+import apple.laf.JRSUIUtils;
4
+import com.sun.tools.corba.se.idl.StringGen;
5
+
6
+import java.util.TreeMap;
7
+
3 8
 /**
4 9
  * Created by leon on 1/23/18.
5 10
  */
6 11
 public class PhoneBook {
7
-}
12
+
13
+    private TreeMap<String, String> tmap;
14
+
15
+   PhoneBook(){
16
+
17
+      this.tmap =new TreeMap<String, String>();
18
+
19
+   }
20
+
21
+   public void addAContact(String name, String number) {
22
+       this.tmap.put(name, number);
23
+   }
24
+
25
+   public void removeAContact(String name, String number){
26
+       this.tmap.remove(name, number);
27
+   }
28
+    public void lookupContact (String name, String number){
29
+
30
+    }
31
+
32
+
33
+       }
34
+

+ 14
- 0
src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java View File

@@ -1,7 +1,21 @@
1 1
 package com.zipcodewilmington.phonebook;
2 2
 
3
+import org.junit.Test;
4
+
3 5
 /**
4 6
  * Created by leon on 1/23/18.
5 7
  */
6 8
 public class PhoneBookTest {
9
+
10
+    @Test
11
+    public void firstContactName() {
12
+
13
+    }
14
+
15
+
16
+
17
+
18
+
19
+
20
+
7 21
 }