Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started