Question: Modify the PROGRAM 4 so that it also satisfies the following two additional Requirements: REQUIREMENT 1:When validating user input for hours used, account for the

Modify the PROGRAM 4 so that it also satisfies the following two additional Requirements:

REQUIREMENT 1:When validating user input for hours used, account for the month and year the charges are being computed for.

REQUIREMENT 2:Display how much money Package A customers would save if they purchased packages B or C, and how much money Package B customers would save if they purchased Package C. If there would be no savings, no message should be printed.

Demonstrate test cases described in table:

Test Case Package Hours Month Year

1 A 49 11 2019

2 a 720 09 2019

3 A 730 06 2019

4 a 99 04 2019

5 B 100 12 2019

6 b 744 10 2019

7 B 745 08 2019

8 c 672 02 2019

9 C 673 02 2019

10 c 696 02 2020

11 C 697 02 2020

Clearly identify the results of each test case.

program 4 code :

#include using namespace std;

int main() { //declarations of variables double chrges; char package; int hours,temp; cout<<" Package A"; cout<<" Package B"; cout<<" Package C"; //takes input cout<<" Enter Package: "; cin>>package; cout<<" Enter used hours: "; cin>>hours; //check valid/invalid input if(hours>720) { cout<<" Invalid value"; cout<<" Please re-enter: "; cin>>hours; } if(package=='A' || package=='a')//first criteria { if(hours<=50) { chrges = hours*15; cout<<" Your monthly charge is: "<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!