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