Question: C++ Programming How do I write a pseudocode and flowchart for this code #include #define SIZE 3 using namespace std; //Reads 3 people names and

C++ Programming

How do I write a pseudocode and flowchart for this code

#include #define SIZE 3 using namespace std;

//Reads 3 people names and their phone numbers to directory. void readInput(string names[], string numbers[]) { cout > names[i]; cout > numbers[i]; } }

//Sorts the directory data based on telephone numbers, and input sort type. void sortDirectory(string names[], string numbers[], char sortType) { if(sortType == 'D') for(int i = 0; i 0) { string temp = numbers[j]; numbers[j] = numbers[j+1]; numbers[j+1] = temp; temp = names[j]; names[j] = names[j+1]; names[j+1] = temp; } } else cout

//Prints the list of names, and their associated numbers. void printDirectory(string names[], string numbers[]) { for(int i = 0; i

//Searches for specified name in the directory. void searchDirectory(string names[], string numbers[], string searchKey) { bool found = false; for(int i = 0; i > choice; switch(choice) { case 1: readInput(names, telephoneNumbers); break; case 2: sortDirectory(names, telephoneNumbers, 'A'); break; case 3: sortDirectory(names, telephoneNumbers, 'D'); break; case 4: printDirectory(names, telephoneNumbers); break; case 5: cout > name; searchDirectory(names, telephoneNumbers, name); break; case 6: return 0; default: cout

 C++ Programming How do I write a pseudocode and flowchart for

Enter your choice: 1 Enter the names and numbers of 3 people to save to directory. Name #1: James Telephone #: 6512395478 Name #2: John Telephone #: 7634567896 Name #3: Ricky Telephone #: 9561234569 1. Input Data 2. Sort Data Ascending 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 2 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 3 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 4 Name: Ricky Name: John Name: ames Telephone: 9561234569 Telephone: 7634567896 Telephone: 6512395478 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 5 Enter the name to search for: Tony User cannot be found. 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 6 Exit code: 0 (normal program termination) Enter your choice: 1 Enter the names and numbers of 3 people to save to directory. Name #1: James Telephone #: 6512395478 Name #2: John Telephone #: 7634567896 Name #3: Ricky Telephone #: 9561234569 1. Input Data 2. Sort Data Ascending 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 2 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 3 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 4 Name: Ricky Name: John Name: ames Telephone: 9561234569 Telephone: 7634567896 Telephone: 6512395478 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 5 Enter the name to search for: Tony User cannot be found. 1. Input Data 2. Sort Data Ascending. 3. Sort Data Descending. 4. Print all Data 5. Search for individual. 6. Quit Enter your choice: 6 Exit code: 0 (normal program termination)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!