Simple java program help.
Hi I have this neighborhood class and I am suppose to right a lemonadestand class for it that keep tracks of the amount of sales at the stand.
This is the neighborhood class
Code:
public class Neighborhood
{
public static void main(String [] args)
{
LemonadeStand stand1 = new LemonadeStand();
stand1.sell(3);
stand1.sell(2);
stand1.sell(1);
System.out.println(stand1.toString());
LemonadeStand stand2 = new LemonadeStand(10);
stand2.sell(5);
System.out.println(stand2);
}
}
this is my code right underneath it.
Code:
public class LemonadeStand();
{
private double lemonSales;
public class sell(double sales)
{
lemonSales = sales;
}
}
my compiler errors are:
Code:
Neighborhood.java:17: '{' expected
public class LemonadeStand();
^
Neighborhood.java:20: '{' expected
public class sell(double sales)
^
Neighborhood.java:20: ';' expected
public class sell(double sales)
^
Neighborhood.java:25: reached end of file while parsing
}