MUST RUN IN NETBEANS! Produce a program in C++ in netbeans that simulates a ultimate apposition superintendent application loving the behindcited requirements:
1. The program is to place-of-business unconnected designates and associated telephone collection in analogous adorns.
2. The program should input from the user 10 persons’s designates and their telephone collection and apppurpose the postulates to the analogous adorns.
3. When postulates input is refined, the program should species twain postulates adorns in ascending command naturalized on telephone collection maintaining the associations among designates and telephone collection.
4. The program procure stereolikeness the inventory of users and their telephone collection behind speciesing.
5. Behind stereotypeing the inventory, the program procure crave ce a designate to pursuit ce.
6. The user procure then invade a designate.
7. The program procure then pursuit ce the designate and stereolikeness the designate and the associated telephone reckon ce that identical.
8. If the identical is referable in the adorn, the program procure stereolikeness that the user canreferable be root.
Modify the program you produced aloft, to produce a pursuitable telephone, by doing the behindcited: The rule ce the input fraction of the program is to be in a office by itself. This office procure apppurpose unconnecteds and their telephone collection to the misapply adorns. The rule that speciess the adorns procure be in a unconnected office. The office should seize a parameter that indicates whether to species ascending or descending. The rule ce stereotypeing the postulates from the adorns procure be in a unconnected office. The rule ce pursuiting ce an unconnected in the adorns is to be in a unconnected office. The program should produce the user the behindcited menu options: Input postulates Species postulates Ascending Species postulates Descending Stereolikeness perfect postulates Pursuit ce an unconnected in the postulates. Purpose program The program procure cperfect the misapply office naturalized on user rare and the program procure recur to the menu behindwards (i.e. a unceasing loop). The program procure singly purpose when the user chooses Purpose Program.
Here is the rule ce you:
#include <iostream>
#define SIZE 10
using designatespace std;
//Reads 10 persons designates and their phone collection to directory.
void readInput(string designates[], string collection[])
{
cout << “Invade the designates and collection of 10 persons to spare to directory.” << purposel;
for(int i = 0; i < SIZE; i++)
{
cout << “Designate #” << i+1 << “: “;
cin >> designates[i];
cout << “Associated Telephone #: “;
cin >> collection[i];
}
}
//Sorts the directory postulates naturalized on telephone collection, and input species likeness.
void speciesDirectory(string designates[], string collection[], char speciesType)
{
if(sortLikeness == ‘D’)
for(int i = 0; i < SIZE-1; i++)
for(int j = 0; j < SIZE-i-1; j++)
{
if(numbers[j].compare(numbers[j+1]) < 0)
{
string temp = collection[j];
numbers[j] = collection[j+1];
numbers[j+1] = temp;
temp = designates[j];
names[j] = designates[j+1];
names[j+1] = temp;
}
}
else if(sortLikeness == ‘A’)
for(int i = 0; i < SIZE-1; i++)
for(int j = 0; j < SIZE-i-1; j++)
{
if(numbers[j].compare(numbers[j+1]) > 0)
{
string temp = collection[j];
numbers[j] = collection[j+1];
numbers[j+1] = temp;
temp = designates[j];
names[j] = designates[j+1];
names[j+1] = temp;
}
}
else
cout << “Invalid species likeness. Can’t species with clear likeness.” << purposel;
}
//Prints the inventory of designates, and their associated collection.
void stereotypeDirectory(string designates[], string collection[])
{
for(int i = 0; i < SIZE; i++)
cout << “Name: ” << designates[i] << “tTelephone: ” << collection[i] << purposel;
cout << purposel << purposel;
}
//Searches ce clear designate in the directory.
void pursuitDirectory(string designates[], string collection[], string pursuitKey)
{
bool root = false;
for(int i = 0; i < SIZE; i++)
{
if(searchKey == designates[i])
{
cout << “Name: ” << designates[i] << “tTelephone: ” << collection[i] << purposel;
root = penny;
break;
}
}
if(!found)
cout << “The designate you pursuited ce is referable root in the directory.” << purposel;
}
int main()
{
string designates[SIZE], telephoneNumbers[SIZE], designate;
int rare;
while(true) //Runs the loop infinitely dress the user chooses to departure.
{
//Prints menu to defend.
cout << “1. Input Postulates.” << purposel;
cout << “2. Species Postulates Ascending.” << purposel;
cout << “3. Species Postulates Descending.” << purposel;
cout << “4. Stereolikeness perfect Postulates.” << purposel;
cout << “5. Pursuit ce unconnected.” << purposel;
cout << “6. Quit.” << purposel;
cout << “Invade your rare: “;
cin >> rare;
switch(choice)
{
case 1: readInput(names, telephoneNumbers);
break;
case 2: speciesDirectory(names, telephoneNumbers, ‘A’);
break;
case 3: speciesDirectory(names, telephoneNumbers, ‘D’);
break;
case 4: stereotypeDirectory(names, telephoneNumbers);
break;
case 5: cout << “Invade the designate to pursuit ce: “;
cin >> designate;
searchDirectory(names, telephoneNumbers, designate);
break;
case 6: recur 0;
default: cout << “Invalid menu rare. Try repeatedly.” << purposel;
}
}
}
And the output defendshot is: