Here is what I have for my code, I am trying to use multiple methods to calculate a best plan for the user based on the hours he inputs.
basically, plan A is $9.95 a month and $2.00 per extra hour and the first 10 hours free.
plan B is $13.95 and $1.00 per extra hour and first 20 hours free.
plan C is $19.95 for unlimited usage.
I am extremely new to programming so I don't know where to begin, the books I've read haven't been very clear either. Thanks for any help
import java.util.Scanner; public class ISProvider2 { public static void main(String [] args) { Scanner input = new Scanner(System.in); //scanner //declare variables int hours = getHours(input); double planA = (((hours - 10) *2) + 9.95); double planB = (((hours - 20) *1) + 13.95); double planC = 19.95; char plan = bestPrice(planA, planB, planC); System.out.println("The best plan for you is " + plan); } public static int getHours(Scanner input) { System.out.println("Enter your hours: "); hours = input.nextInt(); return hours; } public static double bestPrice(double planA, double planB, double planC) { if (planA < planB && planC) System.out.println("Plan A is best for you."); else if (planB < planC) System.out.println("Plan B is best for you."); else System.out.println("Plan C is best for you."); } }