Write a program that has an array of at least 10 string objectsthat hold people’
ID: 3618053 • Letter: W
Question
Write a program that has an array of at least 10 string objectsthat hold people’s names and phone numbers. You may make upyour own strings, or use the following.
“Becky Warren, 555-1223”
“JoeLooney, 555-0097”
“Geri Palmer, 555-8787”
“Lynn Presnell, 555-1212”
“Holly Gaddis, 555-8878”
“SamWiggins, 555-0998”
“BobKain, 555-8712”
“TimHaynes, 555-7676”
“Warren Gaddis, 555-9037”
“Jean James, 555-4939”
“RonPalmer, 555-2783”
The program should ask the user to enter a name or partial nameto search for in the array. Any entries in the array that match thestring entered should be displayed. For example, if t6he userenters “Palmer” the program should display thefollowing names from the list:
Geri palmer, 555-8787
Ron Palmer, 555-2783
Additional(and changed) requirements for subject assignment:
(1) Loaddata from a text file.
(2)Perform case "insensitive" search.
(3) Useeither C-string functions or C++ string class methods.
Explanation / Answer
please rate - thanks #include #include #include using namespace std; string toUpper(string); int main() {int num=11,count=0,i,n; string::size_type found; string name,temp,temp2; string phone[]={"Becky Warren, 678-1223","Jeo Looney,586-0097", "Geri Palmer, 223-8787","Lynn presnell, 887-1212", "Holly Gaddis, 555-8878","Sam Wiggins, 555-0998", "Bob Kain, 555-8712","Tim Haynes, 555-7676", "Warren Gaddis, 555-9037","Jean James, 555-4939", "Ron Palmer, 486-2783"}; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.