Answered step by step
Verified Expert Solution
Link Copied!

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 Provider(ISP) has three different subscription packages for its customers:
Package A: For $15 per month with 50 hours of access provided.
Additional hours are $2.00 per hour over 50 hours.
Package B: For $20 per month with 100 hours of access provided.
Additional hours are $1.50 per hour over 100 hours.
Package C: For $25 per month with 150 hours access is provided.
Additional hours are $1.00 per hour over 150 hours
The ISP has contracted us to write the application software for their new Billing System.
Assume the Billing Cycle is 30 days.
Assume usage is recorded in one-hour 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 calculatePkgA(unsigned short hours);
float calculatePkgB(unsigned short hours);
float calculatePkgC(unsigned short hours);Using your code from Program #3 in PSET-03, 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 isPlanValid(const char plan);
bool areHoursValid(const 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 744, 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

Have issues been prioritized?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago