Write a C++ program for the following case study, where the output can be represented using a simple table format.
An ice cream shop, namely IcE, is selling 4 flavors to its customers. There are 4 outlets of IcE. The customers are provided with an ID, and the top 10 regular customers get a discount of 5% on the family pack from each outlet. Suppose a customer can only visit one outlet per day. Regular customers become eligible for the discount if they purchase ice creams of a minimum of Rs. 2000 within a week, and the discount offer remains valid for the next week. The week begins from Sunday and ends on Saturday. Customers are sorted in descending order of their total purchasing worth. IcE calculates the total profit at the end of each month. The total production cost, including tax, is 70% of the selling price. Write a program to cover all the details of IcE.
A table with prices is provided as follows:
Flavor Size Price
Mango Mini Rs.30/-
Family Pack Rs.120/-
Strawberry Mini Rs.40/-
Family Pack Rs.130/-
Chocolate Mini Rs.40/-
Family Pack Rs.130/-
Vanilla Mini Rs.25/-
Family Pack Rs.110/-
Add any number of data members in the basic layout provided below or make more structures:
1. Make a function to calculate the weekly purchase by a customer.
2. Make a function to print the names of the top 10 customers in each outlet.
3. Provide a function to calculate and print the revenue generated by each outlet.
4. Provide a function to identify and print the age group more likely to receive the discounts.
5. totalSales0: Total sales of each outlet
All the outputs should be displayed in a well-structured manner (e.g., tables).
[Hint]: Consider each iteration as a single day. You can trigger purchases in each outlet randomly.