Write a program to calculate and print out cellular phone bills for one month, and write a test plan to test the program.
The rates will vary depending on the calling plan of the customer:
Fixed rate plan (code F),
per Minute charge plan (code M),
Home customer plan (code H),
home Plus customer plan (code P), or
Business customer plan (code B).
The rates are as follows:
• Code F: A flat $150.00 fee for unlimited minutes (not available to businesses)
• Code M: A charge of $5, plus 21 cents a minute
• Code H: $40 for the first 600 minutes used, plus 19 cents for each additional minute.
• Code P: $64 for the first 1000 minutes used, plus 17 cents for each additional minute
• Code B: $150 for up to 2,000 minutes; $210 for up to 3,000 minutes, and $240 if over
No other codes should be accepted. Remember to define constants for all fixed values. Use double precision floating point variables for all dollar & cents figures.
The program should first explain the program to the user.
Then prompt for a 5-digit customer account number (no leading zeros allowed) and error check that the value entered is valid. Re-prompt until a valid value is entered. This input should be read and error checked from within the main function.
Next call display a menu of plan codes, along with descriptions of each, to the user. Prompt for the plan code and error check that the user entered a valid plan code (accepted in upper or lowercase). Re-prompt until a valid value is entered.
If necessary (all plans except plan F), also prompt for the number of minutes used and error check that the number entered is not negative (i.e. must be at least 0). Minutes used will always be whole numbers. Re-prompt until a valid value is entered.
©2012, Regis University
Calculate the bill total and display the results.
The output should display: the customer account number, the plan chosen in words, the number of minutes used (unless the plan chosen was F), and the total amount of the bill. Display neatly with descriptive text.
After displaying the results, ask the user whether to execute the program again, and do so, as long as the user wishes to continue.
At a minimum, the program must implement three separate functions (in addition to main), as described on the next page:
• One function to read and validate the plan choice, and if necessary, to read and
validate the number of minutes used. Both the plan choice and the number of minutes
used will be passed back to main via reference parameters.
• One function to calculate the amount of the bill and return the bill amount. Pass in
any necessary data as input parameters.
• One function to display the bill output. Pass in any necessary data as input
Use of global variables is NOT allowed. The functions must use parameters to pass required
Why Choose Us
We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.
Professional Academic Writers
Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.
Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.
We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.
At Essay USA, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.
Customer Support 24/7
Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: email@example.com.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Essay USA has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.
At Essay USA, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.
Admission and Business Papers
Be assured that you’ll definitely get accepted to the Master’s level program at any university once you enter all the details in the order form. We won’t leave you here; we will also help you secure a good position in your aspired workplace by creating an outstanding resume or portfolio once you place an order.
Editing and Proofreading
Our skilled editing and writing team will help you restructure you paper, paraphrase, correct grammar and replace plagiarized sections on your paper just on time. The service is geared toward eliminating any mistakes and rather enhancing better quality.
We have writers in almost all fields including the most technical fields. You don’t have to worry about the complexity of your paper. Simply enter as much details as possible in the place order section.