Question: Write a modular python program that will generate a cellular telephone bill, accept cash payments and instruct cashier how to give change. The amount owed
Write a modular python program that will generate a cellular telephone bill, accept cash payments and instruct cashier how to give change.
The amount owed is based on the number of minutes used.
Calculate the cost of the phone bill using the information below.
Use named constants for the base cost and the per minute fees
In addition the program must read from a data file and produce telephone bills
The program should run continually until stopped from the menu
Minutes Base Cost Per Minute Fee
Under $ $
$ $
Over $ $
Your program must successfully meet the requirements below:
Display a menu to offer the user a choice of creating a single telephone bill with payment processing or creating multiple telephone bills without payment processing from a data file. Include an option to quit the program. The menu should be the first thing displayed when your program begins executing.
Prompt user for the customers name, street address, city, state, zip code and number of minutes for a single phone bill. A single customer bill does not require that customer be in the TelephoneData.txt file.
Calculate and display a telephone bill with all information specified in the Sample Output.
After displaying the telephone bill, prompt user for the amount of money received from the customer. The user should supply the amount given in pennies, for example instead of
If the amount of money received from the customer is equal to or greater than the amount owed, calculate the amount of change and display the number of dollars, quarters, dimes, nickels, and pennies that the customer should receive. Otherwise, display a descriptive error message.
Your program's output should be formatted in the same manner as the Sample Output.
Write the program with the following minimum number of functions:
Function displayMenu
A void function that displays the menu. This function accepts no arguments.
Function calcAmountOwed
A function that accepts the number of minutes used as arguments and calculates and returns the amount owed.
Function getPaymentAmount
A function that accepts the amount owed and prompts the user for the payment amount, validates it and returns the validated amount.
Function displayChange
A void function that accepts the amount owed and payment amount as arguments and calculates and displays the change needed formatted to match the Sample Output.
Function processDataFile
A void function that reads the specified text file and calculates and displays telephone bills for each record in the file. This function accepts no arguments all needed information is read from file and calls function to complete the task of displaying telephone bills.
Your program must read and display phone bills from the TelephoneData.txt file. When the user selects the option to create multiple telephone bills, bills should be calculated and displayed for every record in the file without the user needing to do anything else. The TelephoneData.txt file contains records, but your program must be able to process an identically formatted file with any number of records without counting the records. You do not need to process payment information if this option is chosen by the user.
All keyboard input must be validated with the opportunity to reenter unacceptable input.
Sample Output
Welcome to the CPCC Telephone System
Create Single Telephone Bill
Create Multiple Telephone Bills
Quit
Enter your choice:
Enter the name of the customer: Larry Smith
Enter street address: Main Street
Enter city: Charlotte
Enter state: NC
Enter zip code:
Enter the number of minutes used:
Larry Smith
Main Street
Charlotte, NC
Amount Owed: $
Enter the amount received from customer:
Denomination Number
Dollars
Quarters
Dimes
Nickels
Pennies
Create Single Telephone Bill
Create Multiple Telephone Bills
Quit
Enter your choice:
Leslie Knope
Plymouth Street
Pawnee, IN
Amount Owed: $
Tom Haveford
Lil Sebastian Avenue
Pawnee, IN
Amount Owed: $
April Ludgate
th Avenue
Wamapoke, IN
Amount Owed: $
Jery Gergich
Woodbridge Road
Eagleton, IN
Amount Owed: $
Donna Meagle
Elysian Fields Blvd
Eagleton, IN
Amount Owed: $
Create Single Telephone Bill
Create Multiple Telephone Bills
Quit
Enter your choice:
is not a valid choice
Create Single Telephone Bill
Create Multiple Telephone Bills
Quit
Enter your choice:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
