/*
 * Author: Leong Lee
 * Created: Wednesday, 1 June, 2005 10:59:07
 * Modified: Wednesday, 1 June, 2005 10:59:07
 */


class VolcanoRobot
{
	String status;
	int speed;
	float temperature;
	
	void checkTemperature(){
		if (temperature > 600) {
			status = "returning home";
			speed = 6;
		}
	}
	
	void showAttributes() {
		System.out.println ("Status: " + status);
		System.out.println ("Speed: " + speed);
		System.out.println ("Temperature: " + temperature);
	}
	
	public static void main(String[] arguments) {
		VolcanoRobot richard = new VolcanoRobot();
		richard.status = "exploring";
		richard.speed = 2;
		richard.temperature = 510;
		richard.showAttributes();
		
		System.out.println("Increasing speed to 3.");
		richard.speed = 3;
		richard.showAttributes();
		
		System.out.println("Changing temperature to 670.");
		richard.temperature = 670;
		richard.showAttributes();	
		
		System.out.println("Checking the temperature");
		richard.checkTemperature();
		richard.showAttributes();		
	}

}
