Write an application that allows a user to enter the names and phone numbers of
ID: 3682416 • Letter: W
Question
Write an application that allows a user to enter the names and phone numbers of up to 20 friends. Continue to prompt the user for names and phone numbers until the user enters "zzz"or has entered 20 names, whichever comes first. When the user is finished entering names, produce a count of how many names were entered, but make certain not to count the application-ending dummy "zzz" entry. Then display the names. Ask the user to type one of the names and display the corresponding phone number. Save the application as PhoneBook.java
This should be done with arrays (it can include 2D arrays)!
Explanation / Answer
the output is
Please enter a name: peter
Please enter their phone number: 1111
Please enter a name: sue
Please enter their phone number: 2222
Please enter a name: lisa
Please enter their phone number: 3333
List of names and phone number
------------------------------
peter phone: 1111
sue phone: 2222
lisa phone: 3333
Please enter a name to find sue
The name sue was found with the phone number 2222
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.