Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An Internet Service Provider ( ISP ) has three different subscription packages for its customers: Package A: For $ 1 5 per month with 5
An Internet Service ProviderISP has three different subscription packages for its customers:
Package A: For $ per month with hours of access provided.
Additional hours are $ per hour over hours.
Package B: For $ per month with hours of access provided.
Additional hours are $ per hour over hours.
Package C: For $ per month with hours access is provided.
Additional hours are $ per hour over hours
The ISP has contracted us to write the application software for their new Billing System.
Assume the Billing Cycle is days.
Assume usage is recorded in onehour increments,
Write a program that uses the following functions to obtain the number of hours consumed, and calculates the different amounts owed based on the plan type:
unsigned short getHours;
float calculatePkgAunsigned short hours;
float calculatePkgBunsigned short hours;
float calculatePkgCunsigned short hours;Using your code from Program # in PSET add functions to prompt the user to enter a valid plan, and validate the number of hours entered, using functions. You must implement and call the following functions in your code:
char getPlan;
bool isPlanValidconst char plan;
bool areHoursValidconst unsigned short hours;
If the user enters a plan that is not A B or C the program should report this to the user and exit.
If the user enters a number of hours greater than the program should report this and exit.
Your program must use a switch statement to call the selected calculatePkg function; the functions for plans A B and C should be the same as you submitted last week. C programming
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started