import java.util.Scanner; public class MainApplication { public static void main(String[] args) { // Console.println("Welcome to my calculator!"); // String s = Console.getStringInput("Enter a string"); // Integer i = Console.getIntegerInput("Enter an integer"); // Double d = Console.getDoubleInput("Enter a double."); // Console.println("The user input %s as a string", s); // Console.println("The user input %s as a integer", i); // Console.println("The user input %s as a d", d); String output = Console.getStringInput("type something"); Console.println(output); } public void runCommandLoop() { Scanner input = new Scanner(System.in); Scanner input2 = new Scanner(System.in); while (true) { System.out.print("Enter a command: "); String command = input.next(); if (command.equalsIgnoreCase("exit")){ System.out.print("Thanks for calculating with us!"); break; } if (command.equalsIgnoreCase("add")){ //input = Console.getIntegerInput("type a number"); //input2 = y; //calc.add(x,y); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } } } }