You have been tasked to implement a program that manipulates a list of clients’ information. The client information consists of client’s phone number, first name, last name, and age. The list is not sorted in any particular order. Furthermore, you are given the entire list stored into a single string. This primitive way of storing such information is limiting. Hence, you should parse the string and harvest all its content into proper containers and data types. A series of functions must be implemented as follows

 A function that parses clients data into proper data containers (20 marks)
 A function that finds the yougest client (10 marks)
 A function that sorts the clients by first name (10 marks)
 A function that prints out the sorted client list (10 marks)
 A function that computes the average age of the clients (10 marks)
The output of your program should be identical to the screenshot shown below. In the next page, you will find code snippets that can be copied into your program to save you the time of having to enter the client list manually. Please add your functions to the existing code, and DONOT change the provided function getClientDatabase() in any way or form. Also you should not call getClientDatabase() or parse the client list more than once.

#include <iostream>
#include <string>
using namespace std;
string getClientDatabase();
int main()
{
string data = getClientDatabase();
// TODO:
// Implement a function that parses clients data into proper containers
// Implement a function that finds the youngest client
// Implement a function that sorts the clients by first name
// Implement a function that prints out the sorted client list
// call these functions in main following the same mentioning order
return 0;
}
string getClientDatabase()
{
return
"(844)615-4504 Sofia Ross 57 \n"
"(822)516-8895 Jenna Doh 30 \n"
"(822)896-5453 Emily Saks 43 \n"
"(844)307-0763 Kerli Wilson 27 \n"
"(844)897-3011 Gemma Jaywald 38 \n"
"(833)384-2890 Emma Genkins 21 \n"
"(822)962-3158 Samantha Kenwald 34 \n"
"(833)655-3197 Madison Kemeco 57 \n"
"(811)843-8654 Jane Smith 57 \n"
"(899)482-2829 Kerry Lee 28 \n"
"(822)921-0896 Kathy Lesly 59 \n"
"(844)417-6046 Jason Daniels 59 \n"
"(811)908-6536 Kenny Wald 56 \n"
"(811)292-1219 Jenny Stone 23 \n"
"(855)302-1086 Michelle Han 42 \n"
"(833)031-1871 Grace Genny 21 \n"
"(822)704-3313 Rachel McCarthy 46 \n"
"(833)157-3665 Kathleen Kelly 41 \n"
"(899)782-8783 Katie Norton 53 \n"
"(822)248-0208 Sherline Joans 21 \n"
"(899)024-3379 Kathy Jonas 47 \n"
"(844)278-9440 Hannah Stuert 33 \n"
"(855)320-0148 Penny Marino 29 \n"
"(855)973-1712 Lisa Hanson 57 \n"
"(822)471-8413 Yvette Longoria 31 \n"
"(822)826-2765 Rose Jenings 38 \n"
"(899)950-0083 Kathrine Hinds 39 \n"
"(811)571-3930 Ima Jones 50 \n"
"(844)112-5253 Josh Hart 41 \n"
"(899)704-4794 Kamine Herfer 25 \n";
}

To implement the required functions, we will follow these steps:

Step 1: Parse clients' data into proper data containers.
Step 2: Find the youngest client.
Step 3: Sort the clients by first name.
Step 4: Print out the sorted client list.
Step 5: Compute the average age of the clients.

Let's implement each function one by one.

1. Parse clients' data into proper data containers:
This function should take the client data string, parse it, and store the information into proper data containers like arrays or vectors. We will use vectors to store the client information. Each client will be represented by a struct or class containing the phone number, first name, last name, and age. Here's how you can implement this function:

```cpp
#include <iostream>
#include <string>
#include <vector>
#include <sstream>

struct Client {
std::string phoneNumber;
std::string firstName;
std::string lastName;
int age;
};

std::vector<Client> parseClientData(const std::string& data) {
std::vector<Client> clients;
std::istringstream iss(data);

std::string phoneNumber;
std::string firstName;
std::string lastName;
int age;

while (iss >> phoneNumber >> firstName >> lastName >> age) {
Client client;
client.phoneNumber = phoneNumber;
client.firstName = firstName;
client.lastName = lastName;
client.age = age;
clients.push_back(client);
}

return clients;
}
```

2. Find the youngest client:
This function should find the youngest client from the list of clients. We can iterate through the vector of clients and keep track of the client with the minimum age. Here's how you can implement this function:

```cpp
Client findYoungestClient(const std::vector<Client>& clients) {
Client youngestClient = clients.front();

for (const Client& client : clients) {
if (client.age < youngestClient.age) {
youngestClient = client;
}
}

return youngestClient;
}
```

3. Sort the clients by first name:
This function should sort the clients in the vector by their first names. We will use the `std::sort` function from the `<algorithm>` library to sort the clients. Here's how you can implement this function:

```cpp
bool compareClientsByFirstName(const Client& client1, const Client& client2) {
return client1.firstName < client2.firstName;
}

void sortClientsByFirstName(std::vector<Client>& clients) {
std::sort(clients.begin(), clients.end(), compareClientsByFirstName);
}
```

4. Print out the sorted client list:
This function should print out the sorted client list to the console. We will iterate through the vector of clients and print each client's information. Here's how you can implement this function:

```cpp
void printClientList(const std::vector<Client>& clients) {
for (const Client& client : clients) {
std::cout << client.phoneNumber << " " << client.firstName << " " << client.lastName << " " << client.age << std::endl;
}
}
```

5. Compute the average age of the clients:
This function should calculate the average age of all the clients. We can iterate through the vector of clients and sum up all the ages. Then, divide the sum by the number of clients to get the average age. Here's how you can implement this function:

```cpp
double computeAverageAge(const std::vector<Client>& clients) {
int sum = 0;

for (const Client& client : clients) {
sum += client.age;
}

return static_cast<double>(sum) / clients.size();
}
```

Now, let's call these functions in the `main` function:

```cpp
int main()
{
std::string data = getClientDatabase();
std::vector<Client> clients = parseClientData(data);

sortClientsByFirstName(clients);
Client youngestClient = findYoungestClient(clients);
double averageAge = computeAverageAge(clients);

std::cout << "*** Sorted Client List ***" << std::endl;
printClientList(clients);

std::cout << "\nYoungest Client: " << youngestClient.firstName << " " << youngestClient.lastName << std::endl;
std::cout << "Average Age: " << averageAge << std::endl;

return 0;
}
```

This should implement the required program to manipulate the list of clients' information and produce the desired output.