Question: This is my code, I need help modifying it in Java. import java.util.Scanner; public class MobileProvider { public static void main (String [] arg) {

This is my code, I need help modifying it in Java.

This is my code, I need help modifying it in Java. import

java.util.Scanner; public class MobileProvider { public static void main (String [] arg)

import java.util.Scanner;

public class MobileProvider { public static void main (String [] arg) { Scanner scan = new Scanner(System.in);

char pack='x'; int minutes; boolean correct=true; double bill=0.00;

{ System.out.print("Enter the subscription you purchased: ");

pack=scan.next().charAt(0);

if(Character.toUpperCase(pack)=='A' || Character.toUpperCase(pack)=='B'|| Character.toUpperCase(pack)=='C') correct=false; else { System.out.println("Error! not available."); correct=true; }

} System.out.print("How many minutes were used: "); minutes=scan.nextInt();

if(Character.toUpperCase(pack)=='A' ) { if( minutes 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. Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A,B, or C ) and the number of minutes that were used. The program should display the total charges. Modify the program you wrote for Programming Challenge 13 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!