Question: Program 2 ( 2 5 points ) Demonstrating Methods Create a program with the following methods. You can create them as static methods alongside main
Program points Demonstrating Methods
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 to choose the type of phone on sale. The Model sells for $ Model sells for $ and the Model sells for $ 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 phones give a 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.
minutes per month is $
minutes per month is $
Unlimited minutes is $
All plans have unlimited data for $
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.
WRITE THIS PROGRAM IN JAVA.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
