Ver código fonte

Update 'README.md'

nhu313 6 anos atrás
pai
commit
120cca73cd
1 arquivos alterados com 6 adições e 7 exclusões
  1. 6
    7
      README.md

+ 6
- 7
README.md Ver arquivo

17
 
17
 
18
 ### Building a basic `PhoneBook` class
18
 ### Building a basic `PhoneBook` class
19
 
19
 
20
-<img src = "https://git.zipcode.rocks/Cohort4.2/CR-MicroLabs-Composition-PhoneBook/raw/branch/master/PhoneBookUML.png">
21
 
20
 
22
 
21
 
23
 * Create a `PhoneBook` class that holds names and phone numbers.
22
 * Create a `PhoneBook` class that holds names and phone numbers.
27
 
26
 
28
 * Your PhoneBook class should have the following method
27
 * Your PhoneBook class should have the following method
29
 
28
 
30
-
29
+    * hasEntry(String name)
30
+        * given a name, return true if there is an entry with that name, false otherwise
31
 	* `add(String name, String phoneNumber)`
31
 	* `add(String name, String phoneNumber)`
32
 		* adds an entry to the composite associate data type
32
 		* adds an entry to the composite associate data type
33
-	* `remove(String name)`
34
-		* removes an entry to the composite associate data type
35
 	* `lookup(String name)`
33
 	* `lookup(String name)`
36
 		* returns a phone number for the respective input `name`
34
 		* returns a phone number for the respective input `name`
37
-
35
+	* `remove(String name)`
36
+		* removes an entry to the composite associate data type
38
 	* `reverseLookup(String phoneNumber)`
37
 	* `reverseLookup(String phoneNumber)`
39
 		* returns a name for the respective input `phoneNumber`
38
 		* returns a name for the respective input `phoneNumber`
40
-	* `toString()`
39
+	* `listNamesAndNumbers()`
41
 		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
40
 		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
42
 		* Format should be `[name] [phone number]`
41
 		* Format should be `[name] [phone number]`
43
 
42
 
48
 		   PhoneBook phoneBook = new PhoneBook();
47
 		   PhoneBook phoneBook = new PhoneBook();
49
 		   phoneBook.add("Zebra", "111-222-333");
48
 		   phoneBook.add("Zebra", "111-222-333");
50
 		   phoneBook.add("Dog", "222-444-4444");
49
 		   phoneBook.add("Dog", "222-444-4444");
51
-		   phoneBook.display();
50
+		   phoneBook.listNamesAndNumbers();
52
 		   ```
51
 		   ```
53
 
52
 
54
 	   * Sample Output
53
 	   * Sample Output