Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago