Lauren Green 89e41e11be All methods updated to work with multiple numbers for one person. Tests added and run too | il y a 6 ans | |
---|---|---|
src | il y a 6 ans | |
.gitignore | il y a 6 ans | |
PhoneBookUML.png | il y a 6 ans | |
README.md | il y a 6 ans | |
pom.xml | il y a 6 ans |
PhoneBook
classPhoneBook
class that holds names and phone numbers.Hint: You should use a sorted map.
Your PhoneBook class should have the following method
add(String name, String phoneNumber)
lookup(String name)
name
remove(String name)
reverseLookup(String phoneNumber)
phoneNumber
listNamesAndNumbers()
Format should be [name] [phone number]
Sample Script
PhoneBook phoneBook = new PhoneBook();
phoneBook.add("Zebra", "111-222-333");
phoneBook.add("Dog", "222-444-4444");
phoneBook.listNamesAndNumbers();
Dog 222-444-4444
Zebra 111-222-333
PhoneBook
class to map names to lists of phone numbers.add()
and remove()
methods to handle adding or removing individual numbersremoveRecord
method for removing an entire entry from your PhoneBook.