import java.util.*;
public class MobileCharge {
public static void main(String[] args) {
// TODO Auto-generated method
stub
Scanner sc=new
Scanner(System.in);
int
f1=0,f2=0,roamingcharge=10,longdistancecharge=5;
char planselected=' ';
System.out.println("Package A: $50
per month, 5gb data , additional data $15 per GB");
System.out.println("Package B: $65
per month, 10gb data, additional data $10 per GB");
System.out.println("Package C: $75
per month, unlimited data provided");
System.out.println("enter your
monthly consumption : ");
int mdc=sc.nextInt();
System.out.println("enter your
choice for monthly plan");
int
data,charge=0,extradatarequired,extracharge=0,totalcharge=0;
char ch=sc.next().charAt(0);
ch=Character.toUpperCase(ch);
switch(ch)
{
case 'A':
{
planselected='A';
data=5;
charge=50;
if(mdc>data) //if extra data needed than
monthly plan then
{
extradatarequired=mdc-data; //extradatacalculated here
extracharge=extradatarequired*15; //extracharge calculated
here
totalcharge=charge+extracharge; //totalcharge calculated here
}
else
{
totalcharge=charge;
}
break;
}
case 'B':
{
planselected='B';
data=10;
charge=65;
if(mdc>data)
{
extradatarequired=mdc-data;
extracharge=extradatarequired*10;
totalcharge=charge+extracharge;
}
else
{
totalcharge=charge;
}
break;
}
case 'C':
{
charge=75;
planselected='C';
totalcharge=75;
}
break;
default:
System.out.println("please choose correct
choice");
}
System.out.println("want to use
roaming services(y/n )");
ch=sc.next().charAt(0);
if(Character.toUpperCase(ch)=='Y')
{
totalcharge=totalcharge+roamingcharge;
f1=1;
}
System.out.println("want to use
long distance call service(y/n)");
ch=sc.next().charAt(0);
if(Character.toUpperCase(ch)=='Y')
{
totalcharge=totalcharge+longdistancecharge;
f2=1;
}
double
servicetax=((totalcharge)*11.5)/100;
double
fcctax=((totalcharge)*7.54)/100;
System.out.println("plan selected:
"+planselected);
System.out.println("normal monthly
charge for plan "+planselected+" is "+charge+"$");
System.out.println("extra data
charge: "+extracharge+"$");
if(f1==1)
System.out.println("roaming charge: "+roamingcharge+"$");
if(f2==1)
System.out.println("long distance call charge:
"+longdistancecharge+"$");
System.out.println("service tax:
"+servicetax+"$");
System.out.println("fcc tax:
"+fcctax+"$");
double
paymentamount=totalcharge+servicetax+fcctax;
System.out.println("total amount
paid: "+paymentamount+"$");
}
}
DON'T FORGET TO LIKE.
THANKS BY HEART.
Problem: Mobile Service Provider A mobile service provider has three different subscription packages for its customers:...
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...
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 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...
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 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...
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....
In PYTHON code: Examples of output are as follows: If the user entered Package A and 30 GB of data, then you should get the following output: Mobile Service Provider Enter your mobile phone package (A, B or C): A How many gigabytes data did you use? 30 Your total cost for Package A is 299.99 If you had chosen Package C you would have saved $ 230.00 If you had chosen Package B you would have saved $ 130.00...
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...
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.