Write an OO-based program that will make use of two classes in creating
composed objects.
The first class is the Customer class that is to contain the following:
• Function to print the customer’s data.
• Function to calculate the total cost for the customer.
• Objects made of this class will contain a
o Customer name
o Customer phone number and
o Array of three pointers to objects of type Call.
• Use a friend functions bubble-sort to sort data by cost.
• Use a static data member to keep track of the total revenues based
on all customers. The accumulated cost of all the customers will be
the total revenues made by the company.
The other class is the Call class to represent the data for one call. It is to
contain the following:
• Overload the "<<" to print the objects of type Call.
• Three data elements
o Country
o Number called and
o Cost of call.
You may add other functions to the above classes as you see fit. Use
gets and set conventions. Include proper constructors and
destructors.
The program is to:
1. Received three strings as input. Each string contains one
customer’s data in the following format (see example at end):
“Customer-name his-number country called number cost country
called number cost country called number cost”.
a. You may assume three customers, one call per country and
three calls per customer.
b. Use the input data and output format provided at the end of
the assignment for the final run.
2. Calculate and print total cost of the calls for each customer.
3. Calculate and print the total revenues from all the customers.
4. Print the calls of each customer sorted by cost in ascending order.
5. Use Dynamic allocation /de-allocation of memory where possible.