
/**
 * class Shapes prints out square boxes 
 * 
 * @author Kathryn
 * @version February 2007
 */
import java.util.*;

public class Shapes
{
    // instance variables - encode persistant class state, ...more later...

    /**
     * Constructor for objects of class Shapes
     */
    public Shapes()
    {
        // initialize instance variables, ...more later...
    }

    /**
     * Print a square box with an "*" symbol
     * 
     * @param ??
     * 
     * @return nothing void 
     *
     * In class: (1) How do we make a Shape?
     *           (2) How do we tell the printBox method the width?
     *           (3) What if we want the symbol to be a parameter?
     *           (4) Add a method for reading length
     *           (4) Fix the comments to reflect our code
     */           
    public void printBox()
    {
   
    }

    public static void main(String[] args)
    {
       // allocate an object of class Shapes named myshapes
        
       int width = 0;
       boolean badWidth = true;

       // always allocate a Scanner object for input
       Scanner stdin = new Scanner(System.in);  

       while (badWidth) {
           // No error checking
           System.out.print("Enter the width of a box: ");
           if (!stdin.hasNextInt()) {
               System.out.println("That is not an integer");
               stdin.next();
           } else {
               badWidth = false;
               width = stdin.nextInt();
               System.out.println("Your box width is: " + width + ".\n"); 
           }
       }
    }
}
