In this assignment we use Optional class Create a Phone Book Class and initialize a map in the PhoneBook class with Name and Phone Numbers. Create a PhoneBookCrawler class that uses the PhoneBook
Implement findPhoneByName in PhoneBook class that returns an optional. (No streams)
Implement findPhoneByNameAndPunishIfNothingFound in PhoneBookCrawler that uses the implementation from exercise 1
Implement findPhoneByNameAndPrintPhoneBookIfNothingFound in PhoneBookCrawler that uses the implementation from exercise 1
Did you receive a Hello message from the PhoneBook's toString method? If yes, reimplement the exercise 3 to avoid it get's printed. If no, reimplement exercise 3 to have it actually printed.
Can you reimplement exercise 2 using streams instead of using PhoneBook's findPhoneNumberByName
Can you reimplement exercise 3 using streams instead of using PhoneBook's findPhoneNumberByName
Implement findNameByPhoneNumber in PhoneBook class that returns an optional. Implement findPhoneNumberByNameOrNameByPhoneNumber in PhoneBookCrawler class. First search the phone book by name. If that returns nothing search the phone book by phone number.
Remember to Write the Unit test Cases Stick to the Coding Standards Exception Handling 0 CheckStyle or FindBugs Issue