Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that will create an array of 10 string objects. The array will be initialized with the strings which contain the persons

Write a C++ program that will create an array of 10 string objects. The array will be initialized with the strings which contain the persons name and phone number in one string. The following is an example of test data:

Marcy Mills, 555-3423,

Steven Watts, 586-8900,

Miles Park, 586-2375,

Mandy Lane, 555-7786,

Mitch Skorn, 586-1179,

Will Darnell, 555-3344,

Jamar Gordon, 555-4689,

James Jett, 555-8527,

Claudia Smith, 586-7834,

Joey Smith, 586-1199,

Tony Hicks, 555-6634

The program will prompt the user for the name or part of a name to search for. For example, the user may type in Jamar, and the program should then display Jamar Gordon, 555-4689. If the user enters Smith then the program should have two outputs from the above list.

The program should make use of the string object methods to find the matches. The array should be created in main and use a method to search the array to find the name(s) in the array. If a match is not found then it should display a message indicating there is no match. The method must be passed the array of data.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Why has the conflict escalated?

Answered: 1 week ago

Question

1. What might have led to the misinformation?

Answered: 1 week ago