Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java: Create a program with the following methods. You can create them as static methods alongside main() or have a class to hold the

Using Java:

Create a program with the following methods. You can create them as static methods alongside main() or have a class to hold the methods and create an object of the class to call them. Its up to you on this.

The program makes a bill for someone buying a cell phone and plan.

PhoneCost() This method should ask the user for a number 1-3 to choose the type of phone on sale. The Model 100 sells for $35, Model 200 sells for $45, and the Model 300 sells for $50. It should then ask for the number of phones to purchase sharing this plan. Find the phone cost by multiplying the price of the phone they picked by the number that they picked, and if its for more than 3 phones give a 10% discount. It should return this value.

ChooseMinutesPlan() This method should ask the user which plan they want (by a plan number or number of minutes, its up to you how you ask them.)

800 minutes per month is $40

1000 minutes per month is $60

Unlimited minutes is $80

All plans have unlimited data for $10.

Find the price of the minutes and add the data charge and return this value.

TotalToday() This method should take the phone cost as a passed variable, and the price for for one month of the phone plan as a second passed variable. It should add them together and shows total to the user.

In main() for the program: The program should call the PhoneCost() and store the amount it returns in a variable and call the ChooseMinutesPlan() and store the value it returns in a variable. It should tell the user how much they have to pay today with the TotalToday() method.

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

More Books

Students also viewed these Databases questions

Question

Q.1. Taxonomic classification of peafowl, Tiger and cow ?

Answered: 1 week ago

Question

Q .1. Different ways of testing the present adulterants ?

Answered: 1 week ago

Question

Q.1. Health issues caused by adulteration data ?

Answered: 1 week ago