void checkTemperature() { if (temperature > 660) { status = "returning home"; speed = 5; } }
void showAttributes() { System.out.println("status: " + status); System.out.println("Speed: " + speed); System.out.println("Temperature: " + temperature); } }
And then it says to make another file called VolcanoApplication.Java which has this inside:
dante.showAttributes(); System.out.println("Increasing speed to 3."); dante.speed = 3; dante.showAttributes(); System.out.println("Changing temperature to 670."); dante.temperature = 670; dante.showAttributes(); System.out.println("Checking the temperature."); dante.checkTemperature(); dante.showAttributes(); } }
When I try and compile the application, I get the following errors:
WHICH IS REALLY ANNOYING SINCE I DID EXACTLY WHAT THE BOOK SAID! I even copied the code off their website so I could make sure the problem was with the code, not something I'd done wrong...
Anyway, since that didn't work, I then combined the two files which let me compile it without a problem but it wouldn't let me run the program...
This is reeeeeeeeeallllllllllly annoying. Can someone help? Please?