Write your question here.
InGageX Mobile Communication Service provides their customers three different mobile plans in which customers can choose a package that suite them best. InGageX mobile service plans are as follows:
Package A: 50 AED/month includes 50 minutes. Additional minute costs 50 fills. Data usage is 50 fills per 1MB.
Package B: 100 AED/month includes 60 minutes, 100MB of data. Additional minute costs 30 fills, and any extra data usage beyond the 100MB costs 35 fills per 1MB.
Package C: 200 AED/month includes unlimited calling minutes and unlimited data usage.
Write a program that prompts the user for a customer first and last name, phone number, what mobile package they use, and the number of minutes and data used that month. With that information, calculate their monthly bill and display it to them. You will also include in their bill either a recommendation that they switch to a more cost effective mobile package or thank them for being a customer if they have the appropriate package.
After the invoice is printed, the program shall ask the user if they need to enter the information for another mobile phone or if they wish to exit. If they select the option “Yes” to enter another phone number, prompt the user again for only the phone number, the minutes used, and the data used during the month to calculate the bill for the other phone number. The program shall continuously run until the user select the option “No” for not entering another phone number. In this case, the program will exit.
Functions Requirements:
• create getInput function that takes in the parameters as specified below. The function will get
the input from the user for the first name, last name, phone number, minutes used, data used,
and package selection
void getInput(string &fname, string &lname, string &phone, int &minutes, int &dataused, char &package)
• calc_cost function must be defined as specified below. The function takes in the minutes used,
data used, and package selection as input parameters and returns the cost based on the user
usage
double calc_cost(int minutes, int dataused, char package)
• recommendpack function must be defined as specified below. The function takes in the
minutes used and data used, and returns a character related to the recommended package (A,
B, or C) that has more saving.
char recommendpack(int minutes, int data)
• printInvoice function must be defined as specified below. The function takes in the first name,
last name, phone number, minutes, data used, package and cost, and formats the invoice and
outputs it to the screen for the user.
void printInvoice(string fname, string lname, string phone, int minutes, int dataused, char package, double cost)
• create the proper function calls within your program to solve the required problem