Question: Write a program that has two parallel arrays of String objects. One of the arrays should hold peoples names and the other should hold their

Write a program that has two parallel arrays of String objects. One of the arrays should hold people’s names and the other should hold their phone numbers. Here are example contents of both arrays: 

name Array Example Contents "Harrison, Rose" "James, Jean" "Smith, William" "Smith, Brad"

The program should ask the user to enter a name or the first few characters of a name to search for in the array. The program should display all of the names that match the user’s input and their corresponding phone numbers. For example, if the user enters “Smith”, the program should display the following names and phone numbers from the list: 

Smith, William: 555-1785
Smith, Brad: 555-9224

name Array Example Contents "Harrison, Rose" "James, Jean" "Smith, William" "Smith, Brad" phone Array Example Contents "555-2234" "555-9098" "555-1785" "555-9224"

Step by Step Solution

3.57 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A program that has two parallel arrays of String objects is as fol... View full answer

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 Starting Out With Java From Control Structures Questions!