Question

In: Computer Science

A mobile phone service provider has three different subscription packages for its customers: Package A: For...

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 provided.


Write a program that calculates a customer’s monthly bill. It should ask which package
the customer has purchased and how many minutes were used. It should then display
the total amount due.

Input Validation: Be sure the user only selects package A, B, or C.                                          

Assume 30 day month(Billing Cycle). Maximum Minutes is 43200.

Quality of craftsmanship is part of the grading.

===============================================================================

Solutions

Expert Solution

#include <iostream>

using namespace std;

int main() {

float mins=0,bill=0;

char package;

while(1){

//reading package

  cout<<"Enter your package: ";

  cin>>package;

//checking if it is valid package

  if(package=='A' || package=='a'||package=='b' || package=='B' ||package=='c' || package=='C')

    break;

//error message

  cout<<"Invalid input..try again\n";

}

//reading mins

cout<<"Enter number of mins : ";

cin>>mins;

//checking if package is A

if(package=='A' || package=='a'){

  bill=39.99;

  if(mins>450)

  bill=bill+(mins-450)*0.45;

}

if(package=='B' || package=='b'){

  bill=59.99;

  if(mins>900)

  bill=bill+(mins-900)*0.40;

}

if(package=='C' || package=='c'){

  bill=69.99;

}

cout<<"Total Bill : $"<<bill;

}

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me


Related Solutions

An Internet service provider has three different subscription packages for its customers: Package A: $9.95 per...
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 MATLAB script to calculates a customer’s monthly bill. It should ask which package the customer has purchased and how many hours were used....
**PYTHON** A new movie theatre has three different subscription packages for its customers: Package A: For...
**PYTHON** A new movie theatre has three different subscription packages for its customers: Package A: For $18.95 per month, the customer can watch 2 movies. Any additional movie requires an additional $2 per movie. Package B: For $22.95 per month, the customer can watch 4 movies. Any additional movie requires an additional $1 per movie. Package C: For $30.99 per month, the customer can watch an unlimited amount of movie. Write a script that calculates a customer’s monthly bill. It...
CPSC 1103 Assignment 1 Problem A cell phone provider has three different subscription packages for its...
CPSC 1103 Assignment 1 Problem A cell phone 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 $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per unlimited access is provided. Write a program to ask which package the customer has purchased, what month they are using, and how...
Amazon has three packages (Package A, Package B, and Package C) that is to be shipped...
Amazon has three packages (Package A, Package B, and Package C) that is to be shipped to Bill’s address. Package A is worth $100, Package B is worth $200, and Package C is worth $300. All three packages have a 90% chance of arriving and a 10% chance of being lost in transit. a. Set up a probability distribution with the appropriate probabilities for each possible outcome. b. What is the expected loss (P*)? c. How much risk does Amazon...
Telsave is one of the mobile phone service providers in the region. It offers different calling...
Telsave is one of the mobile phone service providers in the region. It offers different calling plans for different types of users, mainly individual plan and business plan. Telsave’s marginal costs and average costs of providing the calling service are both $5 per hour. The demand for mobile services by individual users and business users are as follows: Individual users  QI= 9000-100PI Business users  QB=6000-50PB where QI and QB are, respectively, total calling hours made by individual users and business users;  PI and...
Telsave is one of the mobile phone service providers in the region. It offers different calling...
Telsave is one of the mobile phone service providers in the region. It offers different calling plans for different types of users, mainly individual plan and business plan. Telsave’s marginal costs and average costs of providing the calling service are both $5 per hour. The demand for mobile services by individual users and business users are as follows: Individual users  QI= 9000-100PI Business users  QB=6000-50PB where QI and QB are, respectively, total calling hours made by individual users and business users;  PI and...
A customer service department asks its customers to rate their​ over-the-phone service on a scale of​...
A customer service department asks its customers to rate their​ over-the-phone service on a scale of​ 1-20 immediately after their service has been completed. The department then matches each​ customer's rating with the number of minutes the person waited on hold. The accompanying table shows the ratings and number of minutes on hold for 10 randomly selected customers. The regression line for the data is (^ is above the Y) Y=16.85-0.15x. Use this information to complete parts a through d....
A TV satellite provider charges $42 a month for its basic service package. Its variable costs...
A TV satellite provider charges $42 a month for its basic service package. Its variable costs are $4 a month per account. The company spends $24 a year per account on marketing with an attrition rate of 1% a month. Assuming an annual discount rate of 5%, calculate the maximum amount that this company could spend to acquire a new customer and still provide a positive expected contribution. Please show the work as I’m trying to learn the concept
wirte a program in java Part I     Internet Service Provider An Internet service provider has three...
wirte a program in java 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. It should ask...
A​ company's customer service department asks its customers to rate their​ over-the-phone service on a scale...
A​ company's customer service department asks its customers to rate their​ over-the-phone service on a scale of 1–20 immediately after their service has been completed. The company then matches each​ customer's rating with the number of minutes the person waited on hold. The accompanying table shows the ratings and numbers of minutes on hold for 10 randomly selected customers. Complete parts a through c below. Minutes Rating 1 14 7 12 3 20 8 15 5 13 2 17 5...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT