Write a complete C++ program that reworks your Cellular Bill calculation program from Chapter 4. Give your source file a meaningful name, such as CellBillFun.cpp.
Your new cell bill program must use 3 functions with parameters, as follows:
1. function calcRegBill - accepts one integer argument for the number of minutes used. Determines and returns the total amount due.
2. function calcPremBill - accepts two integer arguments, for the number of day minutes and number of night minutes used. Determines and returns the total amount due.
3. function printBill - accepts 4 arguments: a string account number, a character service code, an integer total number of minutes used, and an amount due. Note that this is a generic print bill function, which prints either a regular or premium bill, using the following format:
Account Number: XXXXXXX
Service Type: Regular (or Premium, depending on the character received)
Total Minutes: XXXX
Amount Due: $XXX.XX
Your main function will still prompt the user for the account number and service code. Based on the service code, main will ask for the correct number of minutes, then call your functions above as needed to finish the job. In addition you must :
- Correct any logic/calculation errors you had in your previous cellular bill program.
- Incorporate a loop in your program to run the bill as many times as needed. You may do this either by a sentinel controlled loop, or with a counter controlled loop.Make sure all of your control structures are properly indented.
- Run your program with the same test cases as the first Cellular Bill submission.
- Your output can be directed to the console window.
In all of your programs, you must remember the following:
- Include documentation at the beginning of your program.
- Include your first and last name as the first line of all of your program outputs.
- Use appropriate, meaningful identifier names for all variables in your program.
- Declare constant variables for any "numeric constants" in your code.
- Organize your code into logical sections that follow a general input, process, output structure.