Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

Just need help with part 2 & 3

Here is my code for part 1

// Internet Service Provider
#include <iostream>
using namespace std;

int main()
{
char package;
//double total_amount; //Even skipped this!
int hours;

cout << "Select a package: \n" << endl;
cout << "Package\t\tCost\t\tHours Provided\t\tExtra Hours" << endl;
cout << "A\t\t$9.95\t\t10\t\t\t$2.00 per hour" << endl;
cout << "B\t\t$14.95\t\t20\t\t\t$1.00 per hour" << endl;
cout << "C\t\t$19.95\t\tUnlimited\t\tUnlimited" << endl;

cout << "\nEnter the package purchased: ";
cin >> package;
while(package!= 'A' && package!='a' && package!='B' && package!='b'&&
package!='C' && package!='c')
{cout <<"\nError! You must select package A, B, or C. ";
cout <<"Enter the package purchased: ";
cin >> package;}

cout <<"\nEnter the number of hours used: ";
cin >>hours;
cin.get();
while(hours < 0 || hours > 744)
{cout <<"\nError! Hours cannot be negative or exceed 744. \n\nYou must enter appropriate hours.";
cout <<"\n\nEnter the number of hours used. ";
cin >> hours;}

if(package == 'A' || package == 'a')
{if (hours <= 10)
cout<<"\nYour monthly fee is: $9.95";
else cout<<"\nYour monthly fee is: $"<<9.95+(hours-10)*2;}

if(package == 'B' || package == 'b')
{if (hours <= 20)
cout<<"\nYour monthly fee is: $14.95";
else cout<<"\nYour monthly fee is: $"<<14.95 + hours - 20;}

if(package == 'C' || package == 'c')
cout<<"\nYour monthly fee is: $19.95";

cin.get();
return 0;
}

Internet Service Provider An Internet service provider has three different subscription packages for its customers Package A: $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour Package B: $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour Package C: $19.95 per month unlimited access is provided Write a program that calculates a customers monthly b It should ask which package the customer has purchased and how many hours were used. It should then display the total amount due Input Validation: Be sure the user only selects package A, B, or C. Also, the number of hours used in a month cannot exceed 744. Exit the program if user enters incorrect information Internet Service Provider, Part 2 Modify the program (Dont forget to save the first version for submission!) for Internet Service Provider Part 1 so that it also displays 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 Internet Service Provider, Part 3 Months with 30 days have 720 hours, and months with 31 days have 744 hours. February, with 28 days, has 672 hours. Enhance the input validation of the Internet Service Provider Part 2 by asking the user for the month (by name), and validating that the number of hours entered is not more than the maximum for the entire month. Here is a table of the months, their days, and number of hours in each.

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.