Make Java class named Book to build a simple phonebook program that reads in a series of
Fantastic news! We've Found the answer you've been seeking!
Question:
Make Java class named "Book" to build a simple phonebook program that reads in a series of name-number pairs from the user (that is, name and number on one line separated by whitespace) and stores them in a Map from Strings to Integers. The user should enter "quit" when they are finished. Then ask the user for a name and return the matching number, or tell the user that the name wasn't found. If the user types the input given below(Bill), then your programs output should be "243-7787". If the last line of the user input had been a name not in the original list (e.g., "Aaron"), then your programs output should be "Number not listed."
Dale 572-0423
Hank 572-8841
Bill 243-7787
quit
Bill
Related Book For
Posted Date: