can't get the program to work
This program scompiles okay and everything, and it gets to the part where it asks what sport the person will be doing, and then i input the answer, and then nothing happens, what's wrong with my program?
class rental
{
//--Constant Declaration and Initialization--
staticfinaldouble GST = .06;//rate of the GST
staticfinalint snowboard = 30;//cost of renting a snowboard
staticfinalint skis = 20;//cost of renting a pair of skis
staticfinalint poles = 8;//cost of renting a pair of poles
staticfinalint boots = 20;//cost of renting a pair of boots
staticfinalint suit = 25;//cost of renting a snowsuit
publicstatic String sport;
publicstatic String pole;
publicstatic String boot;
publicstatic String snowsuit;
staticpublicint total;
//--Main Method--
publicstaticvoid main(String[]args)
{
sport();
}
staticvoid sport()
{
System.out.println("This program will calculate the price of going skiing or snowboarding.");
System.out.println(" ");
System.out.println("Will you be skiing? (y for yes and n for no)");
sport = KeyIn.aString();
{
while (sport=="y")
{
System.out.println("Skiis will cost you $20");
total = total + skis;
poles();
}
if (sport=="n")
{
System.out.println("A snowboard will cost you $30");
total = total + snowboard;
boots();
}
}
}
staticvoid poles()
{
System.out.println("Do you need poles? (y for nes and n for no)");
pole = KeyIn.aString();
{
while (pole=="y")
{
System.out.println("Poles will cost you $8");
total = total + poles;
boots();
}
if (pole=="n")
{
boots();
}
}
}
staticvoid boots()
{
System.out.println("Do you need boots? (y for nes and n for no)");
boot = KeyIn.aString();
{
while (boot=="y")
{
System.out.println("Boots will cost you $20");
total = total + boots;
suit();
}
if (boot=="n")
{
suit();
}
}
}
staticvoid suit()
{
System.out.println("Do you need a snowsuit? (y for nes and n for no)");
snowsuit = KeyIn.aString();
{
while (snowsuit=="y")
{
System.out.println("A snowsuit will cost you $25");
total = total + suit;
System.out.println("Here is your subtotal");
}
if (pole=="n")
{
System.out.println("Here is your subtotal");
}
}
}
}

