// run with command 
// java SquareTool 13

public class SquareTool {
	public SquareTool (String input) {
		try {
			float in = Float.parseFloat(input);
			Square sq = new Square(in);    // use inner class below
			float result = sq.value;
			System.out.println ("The square of "+ input + " is " + result);
		} catch (NumberFormatException nfe) {
			System.out.println (input + " is not a valid number.");
		}
	}
	
	class Square {	//start of inner class
		float value;
		
		Square (float x) {
			value = x * x;
		}
	}	//end of inner class
		
		
	public static void main (String[] arguments) {
		if (arguments.length < 1) {
			System.out.println("Usage: java SquareTool number");
		} else {
			SquareTool dr = new SquareTool (arguments[0]);
		}
		
	}
}