Question: 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;
Sample output:
Enter the # of hours of access used:
Under plan A your cost is: $
Under plan B your cost is: $
Under plan C your cost is: $
Bonus:
write a function with this signature:
float calculatePacakge
float baseRate,
unsigned short coveredHours,
float overageRate,
unsigned short hoursConsumed;
Refactor your code so that the functions for packages A B and C make a single call to the generalpurpose calculatePackages function and return the same results.
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
