Question: Hello there, please solve this question for me. 4. Phone books show phone numbers under alphabetized last names. Write a program that will accept three

Hello there, please solve this question for me.

Hello there, please solve this question for me. 4. Phone books show

4. Phone books show phone numbers under alphabetized last names. Write a program that will accept three lines of String data, then provide the output as shown below, indicating what the number will be alphabetized under the name in the format last, first, and the phone number including an area code. You may assume that all user names to be input will be first then last (no middle names or initials). For your program, (650) area codes apply to Mountain View and Palo Alto, and (408) area codes apply to Cupertino and San Jose. Don't worry about cities other than these. Your program should be complete, but concise, and does not require loops. Hint: find the space, or " ", after the first name to help you locate the start of the last name. Sample run output (user input shown in bold): % java PhoneBook Enter name as first last: John Adams Enter city of residence: Mountain View Enter phone number (without area code): 123-4567 The phone number will be alphabetized under A, under Adams, John at (650) 123-4567

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!