import java.util.Scanner;
class Robot {
public void speakreturn(String mainmenu) {
System.out.println("What can I do for you?");
}
public void grab(String text) {
System.out.println("Grabbing " + text + " now!");
}
public void jump(int height) {
System.out.println("Jumping " + height + "m" + " high!");
}
public void move(String direction) {
System.out.println("Moving " + direction);
}
}
public class Robo {
public static void main(String[] args) {
Robot kush = new Robot();
Scanner interactive = new Scanner(System.in);
System.out.println("Hello, I'm Kush, What's your name?");
String name = interactive.nextLine();
System.out.println("Nice to meet you " + name +".");
while (1>0) {
String mainmenu = "What can I do for you " + name;
kush.speakreturn(mainmenu);
String action = interactive.nextLine();
if (action == "move") {
kush.move();
}
else if(action == "grab") {
kush.grab();
}
else (action == "menu")
kush.speakreturn(mainmenu);
kush.action(grab);
kush.action(speakreturn);
int measurements = interactive.nextInt();
kush.jump(measurements);
}
}
}
}