Question
C++ programming language: FUNCTIONS An Internet service provider has three different subscription packages for its customers: Package A: For $15 per month with 50 hours
C++ programming language:
FUNCTIONS
An Internet service provider 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. Assume usage is recorded in one-hour increments.
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 Write a program that calculates a customers monthly charges. Implement with the following functions for your solution. getPackage validPackage getHours validHours calculatePkg_A calculatePkg_B calculatePkg_C calculateCharges showBill
Input Validation: 1) Be sure the user only selects package A, B, or C; or a, b, or c. 2) The user cannot use more than 720 hrs in a month. (We will assume a 30-day month for this problem).
Demonstrate test cases described in table: Test Case Package Hours 1 A 50 2 a 51 3 B 100 4 b 101 5 C 149 6 c 251 7 e 720 8 c 722
Clearly identify the results of each test case.
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