Selection
- Initial Deadline:
- 11:00pm, Friday October 1, 2021
Description
A cell phone company has three different plans for its mobile hotspots:
- Plan P: For $49.95 per month 25 GB of data are provided. Additional data are $10.00 per GB.
- Plan Q: For $74.95 per month 40 GB of data are provided. Additional data are $5.00 per GB.
- Plan R: For $99.99 per month unlimited data is provided.
Write a program that calculates a bill based on the plan. The program must ask the user for the plan where the valid inputs are the characters ‘P’, ‘Q’, or ‘R’. If the user enters any other input, then the program must display a message and then exit. If the user enters ‘P’ or ‘Q’, then the program should ask the user for the amount of data used. For this program, you can assume that the data is an integer value. The output of the program should be a bill that shows the plan name, data used and total due.
The program MUST contain at least one if statement and at least one switch statement.