Question

Design a program using a RAPTOR flowchart that has two parallel arrays: a String array named...

Design a program using a RAPTOR flowchart that has two parallel arrays: a String array named people that is initialized with the names of twenty of your friends, and a String array named phoneNumbers that is initialized with your friends’ phone numbers. The program should allow the user to enter a person’s name. It should then search for that person in the people array. If the person is found, it should get that person’s phone number from the phoneNumbers array and display it. If the person is not found in the people array, the program should display a message indicating so.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear student, according to the question, Here I am attaching Program in C++ (generated by Raptor)

#include <iostream>
#include <string>

using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
?? phone;
?? name;
?? i;
?? search;
?? key;
?? result;
??[] people = new ??[??+1];
??[] phonenumber = new ??[??+1];

i =1;
while (!(i>20))
{
raptor_prompt_variable_zzyz ="Enter Person Name";
cout << raptor_prompt_variable_zzyz << endl;
cin >> name;
people[i] = name;
i =i+1;
}
i =1;
while (!(i>20))
{
raptor_prompt_variable_zzyz ="Enter Phone Number";
cout << raptor_prompt_variable_zzyz << endl;
cin >> phone;
phonenumber[i] = phone;
i =i+1;
}
raptor_prompt_variable_zzyz ="Enter a Person Name";
cout << raptor_prompt_variable_zzyz << endl;
cin >> search;
key =0;
i =1;
while (!(i<=20))
{
if (people(i)==search)
{
key =1;
result =phonenumber(i);
}
else
{
}
i =i+1;
}
if (key==1)
{
cout << result << endl; }
else
{
cout << "Entered Person is Not Found" << endl; }

return 0;
}

Raptor design

All the best. Feel free to contact if any doubts

Add a comment
Know the answer?
Add Answer to:
Design a program using a RAPTOR flowchart that has two parallel arrays: a String array named...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design a program that has two parallel arrays: a String array named people that is initialized...

    Design a program that has two parallel arrays: a String array named people that is initialized with the names of seven of your friends, and a String array named phoneNumbers that is initialized with your friends’ phone numbers. The program should allow the user to enter a person’s name (or part of a person’s name). It should then search for that person in the people array. If the person is found, it should get that person’s phone number from the...

  • In Java. Write a GUI contact list application. The program should allow you to input names...

    In Java. Write a GUI contact list application. The program should allow you to input names and phone numbers. You should also be able to input a name and have it display the previously entered phone number. The GUI should look something like the following, although you are welcome to format it in any way that works. This should be a GUI application with a JFrame. The program should contain two arrays of Strings. One array will contain a list...

  • Design a program that allows the user to enter 5 names into a String array. Sort...

    Design a program that allows the user to enter 5 names into a String array. Sort the array in ascending (alphabetical) order and display its contents. Search the array for a specific name that the user wants. For this problem you will be submitting python homework, no flowchart

  • Using arrays create a personal phone directory that contains room for first names and phone numbers...

    Using arrays create a personal phone directory that contains room for first names and phone numbers for 20 people. Using the "names.txt" retrieve the first name and phone number for each person and store in arrays (parallel). Prompt the user for a name, search for the name, and if name is found in the array, display the corresponding phone number. If the name is not found, prompt the user to enter a phone number, and add the new name and...

  • C++ with Pseudocode in the beginning This assignment will require you to write a program that...

    C++ with Pseudocode in the beginning This assignment will require you to write a program that will create an array of 10 string objects. The array will be initialized with the strings which contain the person’s name and phone number in one string. The following is an example of test data: “Renee Javens, 678-1223”, “Joe Looney, 586-0097”, “Geri Palmer, 223-8787”, “Lynn Presnell, 887-1212”, “Bill Wolfe, 223-8878”, “Sam Wiggins, 486-0998”, “Bob Kain, 586-8712”, “Tim Haynes, 586-7676”, “John Johnson, 223-9037”, “Jean James,...

  • Parallel Arrays Summary In this lab, you use what you have learned about parallel arrays to...

    Parallel Arrays Summary In this lab, you use what you have learned about parallel arrays to complete a partially completed Java program. The program should either print the name and price for a coffee add-in from the Jumpin’ Jive coffee shop or it should print the message: "Sorry, we do not carry that.". Read the problem description carefully before you begin. The data file provided for this lab includes the necessary variable declarations and input statements. You need to write...

  • Design a program that allows the user to enter 20 names into a String array. Sort...

    Design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents. Can I get this in C++ Language Flowchart please

  • USING RAPTOR For the following Programming Challenges, use the modular approach and pseudocode to design a suitable program to solve it. Create a program that allows the user to input a list of first...

    USING RAPTOR For the following Programming Challenges, use the modular approach and pseudocode to design a suitable program to solve it. Create a program that allows the user to input a list of first names into one array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. The output should be a list of email addresses where the address is of the following from: first.last@mycollege.edu

  • C coding language is used. Write a program that declare parallel arrays for storing information about...

    C coding language is used. Write a program that declare parallel arrays for storing information about 10 employees. One array will store the hours each person worked for a week and a second array will store each person's weekly pay. Your program should ask the user for the number of hours each of the 10 employees worked. The pay should calculate both regular and overtime pay. Assume that all 10 employees earn $15.25 per hour. Your program should allow the...

  • Exercise Five: (Parallel Array) In this exercise create two string arrays. One array will hold your...

    Exercise Five: (Parallel Array) In this exercise create two string arrays. One array will hold your name, another will hold corresponding password. Example: string name [] = {"name1","name2", "name3"}; string password [] = {"password1", "password2", "password3"}; Here for name1, matching password is password1, name2, matching password is password2 and so on.... Please ignore my creativity, you can pick name and password your way and it doesn't have to have just 3 names and password. It can be less/more. I am...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT