Browse Source

update read me

Nhu Nguyen 6 years ago
parent
commit
9433eff8a1
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      README.md

+ 10
- 7
README.md View File

26
 
26
 
27
 * Your PhoneBook class should have the following method
27
 * Your PhoneBook class should have the following method
28
 
28
 
29
+
29
 	* `add(String name, String phoneNumber)`
30
 	* `add(String name, String phoneNumber)`
30
 		* adds an entry to the composite associate data type
31
 		* adds an entry to the composite associate data type
31
 	* `remove(String name)`
32
 	* `remove(String name)`
35
 
36
 
36
 	* `reverseLookup(String phoneNumber)`
37
 	* `reverseLookup(String phoneNumber)`
37
 		* returns a name for the respective input `phoneNumber`
38
 		* 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.
39
+	* `toString()`
40
+		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
41
+		* Format should be `[name] [phone number]`
42
+
40
 
43
 
41
 	   * Sample Script
44
 	   * Sample Script
42
-	
45
+
43
 		   ```java
46
 		   ```java
44
 		   PhoneBook phoneBook = new PhoneBook();
47
 		   PhoneBook phoneBook = new PhoneBook();
45
 		   phoneBook.add("Zebra", "111-222-333");
48
 		   phoneBook.add("Zebra", "111-222-333");
46
 		   phoneBook.add("Dog", "222-444-4444");
49
 		   phoneBook.add("Dog", "222-444-4444");
47
-		   phoneBook.display(); 
50
+		   phoneBook.display();
48
 		   ```
51
 		   ```
49
-	
52
+
50
 	   * Sample Output
53
 	   * Sample Output
51
-	
54
+
52
 		   ```
55
 		   ```
53
 			Dog 222-444-4444
56
 			Dog 222-444-4444
54
 			Zebra 111-222-333
57
 			Zebra 111-222-333
55
 		   ```
58
 		   ```
56
-      
59
+
57
 
60
 
58
 ### Implementing Many-PhoneNumbers-To-One-Person Relationship
61
 ### Implementing Many-PhoneNumbers-To-One-Person Relationship
59
 
62