Help me with my program please!!
Here are the requirements:
(1) The weekly fee for mowing a lot under 400 square feet is $25 per week. The fee for a lot between 400 and 600 square feet is $35 per week. For lots over 600 square feet you will charge $50 per week. Display fees in a dialog box and prompt the user for the length and width of the lot to be mowed (prompt again if either is not positive). Display the resulting seasonal fee for the lot size.
(2) You decide to give customers a discount if they pay up front. Give the option to pay once, twice, or twenty times a season. If they pay once, they get 10% off, if they pay twice, they get 5% off, and if they pay 20 times (weekly), there is no discount. Provide the details, prompt the user for a plan, and then display an invoice with all the information.
I basically need help on requirement 2. How do I prompt the user if they want to pay upfront once, twice, etc?
public class Methods
final double MOWING_SEASON = 20;
final double ONCE_DISCOUNT = .1;
final double TWICE_DISCOUNT = .05;
public static void main (String  args)
double Length = getLength();
double Width = getWidth();
double LotPrice = calcPrice(Length, Width);
double Percent = PercentDiscount();
public static void fee()
JOptionPane.showMessageDialog(null, "Prices for different lot sizes:\n"
+ "Lot < 400 Sq Ft: Cost $25 per week\n"
+ "Lot between 400 and 600 Sq Ft: Cost $35 per week\n"
+ "Lot > 600 Sq Ft: Cost $50 per week");
public static double getLength()
length = Double.parseDouble(JOptionPane.showInputDialog("Please enter the length for your lot: "));
}while(length < 0);
public static double getWidth()
width = Double.parseDouble(JOptionPane.showInputDialog("Please enter the width for your lot: "));
}while(width < 0);
public static double calcPrice(double Length, double Width)
double size = Length * Width;
String lotsize = "";
if (size < 400)
lotsize = "$25 per week";
if (size > 400 || size <600)
lotsize = "$35 per week";
if (size > 600)
lotsize = "$50 per week";
public static double PercentDiscount()
// pay once = 10% off
// pay twice = 5% off
// pay >= 3 time than no discount
public static void output()
Any help would be great!