Fix to grow a square based on user input
<p>I wrote two classes. The main class runs the program. It asks for user input.  Based on user input, the second class will print out a square.  Each square will print out ---- for every number and | for every number for the walls.</p>

<p>For example, say that the user entered two.  In that case, it will print out a square.</p>

<pre><code>----- -----
|         | 
|         | 
----- -----
</code></pre>

<p>The problem is that I cant get the square the grow based on the user input.</p>

<p>This is the main class</p>

<pre><code>import java.util.Scanner;

public class Assignment4 
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);

        SquareBuilder square = new SquareBuilder(scan.nextInt());

        System.out.print(square.toString());
        square.changeSize(scan.nextInt());
        System.out.print(square.toString());
        square.changeSize(scan.nextInt());
        System.out.print(square.toString());
        square.changeSize(scan.nextInt());
        System.out.print(square.toString());
        square.changeSize(scan.nextInt());
        System.out.print(square.toString());
    }
}

public class SquareBuilder
{
    final private int LENGTH_RATIO = 4;
    final private String CEILING_FLOOR = "----";
    private int size;
    private int spaces;
    private String square;      

    public SquareBuilder(int size) 
    {
        this.size = size;
        constructSquare();
    }

    private void spaces()
    {
         spaces = LENGTH_RATIO * size - 2;
    }

    private void ceilingAndFloor()
    {
        square += "\n";
        for (int i = 0; i &lt; size; ++i)
        {
            square += CEILING_FLOOR;
        }
    }

    private void walls()
    {
        for (int i = 0; i &lt; size; ++i )
        {
            square +="\n|";

            for (int j = 0; j &lt; spaces; ++j)
            {
                square +=" ";
            }

            square +="|";
        }
    }

    private void constructSquare()
    {
        spaces ();
        square = "";

        ceilingAndFloor();
        walls();
        ceilingAndFloor();

    }

    public int area()
    {
        return size * size;
    }

    public void changeSize(int size)
    {
        this.size = size;
    }

    public String toString()
    {
        String retVal = square;
        retVal += "\nSize: " + size + " Area: " + area();

        return retVal;
    }
}
</code></pre>
