Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This homework will give you practice using user input with the Scanner class and the 'if stmt. You are writing a program for a cell

image text in transcribed
This homework will give you practice using user input with the Scanner class and the 'if stmt. You are writing a program for a cell phone provider that offers three different plans: Option 1: Unlimited Calling and Texting. Price $64.99 per month. Option 2: Unlimited Calling and Pay per text. Base Price: $59.00 per month plus 5 cents per text. Option 3: $35.00 base price for up to 50 minutes of calling, and then 3 cents per minute This option does not allow texting. Write a program that calculates a monthly bill. The program should ask the user to enter: 1. the plan chosen 2. the number of minutes used 3. and if appropriate, the number of text messages. For Option 3, if the user exceeds the number of free minutes (50) a message should display telling the user how many minutes will be charged (hint use nested-if) The program should neatly print the price for the month along with the method used to calculate the price. Run your program with at least 5 different inputs. Be sure to test each possible case (If you use the switch statement, then give in 2 versions of your program, one with the if else-if and one with the switch) Please use java

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago