Create ONLY PSEUDOCODE AND FLOWCHART FOR THE PROGRAM BELOW IN C++ (I have already written the pr

Create ONLY PSEUDOCODE AND FLOWCHART FOR THE PROGRAM BELOW IN C++ (I have already written the program) that simulates a simple contact manager application given the following requirements:

The program is to store individual names and associated telephone numbers in parallel arrays.

The program should input from the user 10 people’s names and their telephone numbers and add the data to the parallel arrays.

When data input is finished, the program should sort both data arrays in ascending order based on telephone numbers maintaining the associations between names and telephone numbers.

The program will print the list of users and their telephone numbers after sorting.

After printing the list, the program will ask for a name to search for. The user will then enter a name.

The program will then search for the name and print the name and the associated telephone number for that person.

If the person is not in the array, the program will print that the user cannot be found.

The program must use at least one menu at the beginning with multiple options including an option to exit the program. The program must run continuously, in a cyclic manner until the user chooses to exit. Sublevel menus are allowed. The program must use: multiple data types, multiple mathematical operators, decision structures, iterative structures, and functions.

#include <iostream>
#include <string>
#include <iomanip> // std::setprecision
using namespace std;

// Declaring Global Arrays
string names[10];
long long phoneNos[10];

// Function Declarations
void getData();
void sort();
void display();
long long searchPhoneNum();

int main()
{

// Declaring variables
int choice;

/* This while loop continues to execute
* until the user enters a valid number
*/
while (true)
{
cout << “:: Menu ::” << endl;
cout << “1.Store Data.” << endl;
cout << “2.Sort.” << endl;
cout << “3.Search Phone Number.” << endl;
cout << “4.Exit.” << endl;

cout << “Enter Choice :”;
cin >> choice;

/* Based on the user’s choice
* the corresponding case will be executed
*/
switch (choice)
{
case 1:
{
// Calling the functions
getData();
continue;
}
case 2:
{
// Calling the functions
sort();
display();
continue;
}
case 3:
{
// Calling the functions
long long no = searchPhoneNum();
if (no != -1)
cout << “The Telephone number is :” << no << endl;
else
cout << “** Name not found **” << endl;
continue;
}
case 4:
{
cout << “** Program Exit **” << endl;
break;
}
default:
{
cout << “** Invalid Input **” << endl;
continue;
}
}
break;
}

return 0;
}

/* Function implementation which will
* get the data from the user and populate
* the data into arrays.
*/
void getData()
{
string name;
long long phNo;
for (int i = 0; i < 10; i++)
{
cin.ignore();
cout << “Enter name of Person # ” << i + 1 << “:”;
std::getline(std::cin, name);
names[i] = name;

cout << “Enter Phone Number:”;
cin >> phNo;
phoneNos[i] = phNo;
}
}

/* Function implementation which will
* which will sort the data in the arrays.
*/
void sort()
{
// This Logic will Sort the Array of elements in Ascending order
string tempName;
long long tempNum;
for (int i = 0; i < 10; i++)
{
for (int j = i + 1; j < 10; j++)
{
if (phoneNos[i] > phoneNos[j])
{
tempNum = phoneNos[i];
phoneNos[i] = phoneNos[j];
phoneNos[j] = tempNum;

tempName = names[i];
names[i] = names[j];
names[j] = tempName;
}
}
}
}

/* Function implementation which will
* search the phone number in the arrays.
*/
long long searchPhoneNum()
{
string name;

cin.ignore();

cout << “Enter the name :”;
std::getline(std::cin, name);
int i = 0;
while (i < 10)
{
if (name.compare(names[i]) == 0)
{
return phoneNos[i];
}
i++;
}
return -1;
}

/* Function implementation which will
* display the data in the arrays.
*/
void display()
{
cout << “nDisplaying Names and Phone Numbers After sorting ” << endl;
for (int i = 0; i < 10; i++)
{
cout << setw(10) << names[i] << “tt” << phoneNos[i] << endl;
}

Expert Answer

 

The pseudocode and flowchart for the above program is as follows:

Pseudocode:

Flowchart

Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?