Question

Internet Service Provider

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.
0 0
Add a comment Improve this question Transcribed image text
Answer #1
Dear,

You haven't specified the language you are looking for, so giving you in JavaStill any updation come back so that we can help you.


import java.io.*;
import java.util.Scanner; // Needed for Scanner class

class InternetService
{
public static void main(String[] args)
{
int hours;
char Package;
double total_amount=0;
String s1;
// Create a Scanner object for keyboard input.
Scanner keyboard = new Scanner(System.in);
//inputting data
System.out.println("tMenun");
System.out.println("tA-Package AntB-Package B
ntC-Package C");
System.out.println("Enter your choice:");
s1=keyboard.nextLine();
Package=s1.charAt(0);

//inputting hours
System.out.println("Enter hours:");
hours=keyboard.nextInt();

switch(Package)
{
case 'A':
if(hours<10)
total_amount=9.95;
else
total_amount=9.95+((hours-10)*2);
break;
case 'B': if(hours<20)
total_amount=14.95;
else
total_amount=14.95+((hours-20)*1);
break;
case 'C':
total_amount=19.95;
break;
}


System.out.println("Monthly bill on Package is: $"
+total_amount);
System.exit(0);
}
}
________________________________________________________________________

Output:
Menu

A-Package A
B-Package B
C-Package C
Enter your choice:
B
Enter hours:
28
Monthly bill on Package is: $22.95



answered by: noell
Add a comment
Know the answer?
Add Answer to:
Internet Service Provider
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • write in java and you must use methods.... Part I     Internet Service Provider An Internet service...

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

  • Modify the program below so it also calculates and displays the amount of money Package A...

    Modify the program below so it also calculates and displays the amount of money Package A customers would save if they purchased Package B or C, and the amount of money Package B customers would save if they purchased Package C. If there would be no savings, no message should be printed. import java.util.*; public class Lab2 { public static void main (String[] args) {    //scanner Scanner input = new Scanner(System.in);    //declarations int hours; char pack; double totalCharges...

  • An Internet service provider has three different subscription packages for its customers: Package A: For $15...

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

  • Problem: Mobile Service Provider A mobile service provider has three different subscription packages for its customers:...

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

  • Part 1: A mobile phone service provider has three different data plans for its customers: Package...

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

  • An Internet service provider offers four subscription packages to its customers, plus a discount for nonprofit...

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

  • write in C++ Problem 1: Mobile Service Provider A cell phone service provider has three different...

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

  • Please can someone help me with making this program in JAVA implementing classes. Also, include loops...

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

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

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT