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 customer’s monthly charges.
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 probkem).
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.
Answer: Hey!! Kindly find your solution below. Let me know if any issue. Thanks.
C++ Code:
#include <iostream>
using namespace std;
int main()
{
//declarations of variables
double chrges;
char package;
int hours,temp;
cout<<"\nPackage A";
cout<<"\nPackage B";
cout<<"\nPackage C";
//takes input
cout<<"\nEnter Package: ";
cin>>package;
cout<<"\nEnter used hours: ";
cin>>hours;
//check valid/invalid input
if(hours>720)
{
cout<<"\nInvalid value";
cout<<"\n Please re-enter: ";
cin>>hours;
}
if(package=='A' || package=='a')//first criteria
{
if(hours<=50)
{
chrges = hours*15;
cout<<"\nYour monthly charge is: "<<chrges;
}
else
{
temp = hours-50;
hours = hours-temp;
chrges = hours*15;
chrges = chrges+temp*17;
cout<<"\nYour monthly charge is: "<<chrges;
}
}
else
if(package=='B'|| package=='b')//2nd criteria
{
if(hours<=100)
{
chrges = hours*20;
cout<<"\nYour monthly charge is: "<<chrges;
}
else
{
temp = hours-100;
hours = hours-temp;
chrges = hours*20;
chrges = chrges+temp*21.5;
cout<<"\nYour monthly charge is: "<<chrges;
}
}
else
if(package=='C'|| package=='c')//3rd criteria
{
if(hours<=150)
{
chrges = hours*25;
cout<<"\nYour monthly charge is: "<<chrges;
}
else
{
temp = hours-150;
hours = hours-temp;
chrges = hours*25;
chrges = chrges+temp*26;
cout<<"\nYour monthly charge is: "<<chrges;
}
}
return 0;
}
An online video streaming service has three different subscription packages for its customers: Package Lite: For $5 per month 5 hours of access are provided. Additional hours are $3.00 per hour. Package Regular: For $15 per month 30 hours of access are provided. Additional hours are $2.00 per hour. Package Unlimited: For $30 per month unlimited access is provided. Write a program that calculates a customer's monthly bill. It should ask the user to enter the name of the package the customer has purchased (Lite, Regular, or Unlimited) and the number of hours that were used. It should then display the total charges.In addition, calculate and display the amount of money Lite package customers would save if they purchased the regular or unlimited package, and the amount of money Regular customers would save if they purchased the unlimited package. If there would be no savings, no message should be printed.
i need this on java code can anyoe help?
An Internet service provider has three different subscription packages for its customers: Package A: For $15...
An Internet service provider offers four subscription packages to its customers, plus a discount for nonprofit organizations: Package A: 10 hours of access for $12.95 per month. Additional hours are $4.00 per hour. Package B: 20 hours of access for $14.95 per month. Additional hours are $2.00 per hour. Package C: 30 hours of access for $20 per month. Additional hours are $1.00 per hour. Package D: Unlimited access for $35.95 per month. A nonprofit organizations will get 20% discount...
Problem: Mobile Service Provider A mobile service provider has three different subscription packages for its customers: • Package A: For $50 per month, 5 GB data are provided. Additional data is $15 per GB. • Package B: For $65 per month, 10 data are provided. Additional data is $10 per GB. • Package C: For $75 per month unlimited data provided. Text messaging and voice services are included in all of the company's data packages. The Mobile Service Company offers...
write in java and you must use methods.... Part I Internet Service Provider An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill....
Part 1: A mobile phone service provider has three different data plans for its customers: Package A: For $39.99 per month 4 gigabytes are provided. Additional data costs $10 per gigabyte. Package B: For $59.99 per month, 8 gigabytes are provided. Additional data costs $5 per gigabyte. Package C: For $69.99 per month, unlimited data is provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many gigabytes were...
Package A = $9.95 per month 10 hrs access provided. Additional hrs are $2 per hour.Package B= $13.95 per month 20 hrs access provided. Additional hrs are $1 per hour.Package C = $19.95 per month unlimited access provided.Write a program that calculates a customer's monthly bill to display the letter of the packaged purchased and the number of hours used. Finally display the totalcharges.
write in C++ Problem 1: Mobile Service Provider A cell phone service provider has three different subscription packages for its customers. Package A: For $39.99 per month 450 minutes are provided. Additional minutes are $0.45 per minute. Package B: For $59.99 per month 900 minutes are provided. Additional minutes are $0.40 per minute. Package C: For $69.99 per month unlimited minutes provided. Write a program that calculates a customer’s monthly bill. It should ask which package the customer has purchased...
Limited Resource Decisions Luxury Auto Care Company offers three different service packages (A, B, and C) to its customers. These packages vary from a complete detailing of the automobile (wash, wax, carpet shampoo, etc.) to a simple hand wash. A limitation of 120 labor hours per week prevents Luxury from meeting the demand for its services. Information for the three service packages is as follows: A B C Unit selling price $100 $80 $50 Unit variable costs (60) (35) (25)...
Please can someone help me with making this program in JAVA implementing classes. Also, include loops and selection structures. A mobile service provider has three different subscription packages for its customers: Package A: For $50 per month, 5 GB data are provided. Additional data is $15 per GB. Package B: For $65 per month, 10 data are provided. Additional data is $10 per GB. Package C: For $75 per month unlimited data provided. Text messaging and voice services are included...
Java Programming Problem description with its major requirements labeled from A to I. A mobile phone service provider has three different subscription packages for its customers: Package A: For $39.99 per month 450 minutes are provided. Additional minutes are $0.45 per minute. Package B: For $59.99 per month 900 minutes are provided. Additional minutes are $0.40 per minute. Package C: For $69.99 per month unlimited minutes are provided. Design a class MobileCharges that calculates a customer’s monthly bill. It should...