title: Simple Java program that squares and cubes a users input number
body: <p>I am currently taking my first programming class in college and so far have been very good with understanding how to code basic things. This latest assignment has me confused and stumped. </p>
  
  <p>My assignment is to: </p>
  
  <blockquote>
    <ol>
    <li>Accept numeric input from the user (integer value)        </li>
    <li>Print out the square and cube of the number entered.        </li>
    <li>Make sure that the number is > 0.        </li>
    <li>Repeat the above three times.        </li>
    <li>If the number entered is &lt;= 0 then end the program, telling the user              why.       </li>
    </ol>
  </blockquote>
  
  <p>My issue is that I am unsure how the variables are to be set for this and how exactly to add the loop to repeat the process 3 times. </p>
  
  <p>This is all I have so far and do not know where to go from here, any help would be appreciated. Thank you</p>
  
  <pre><code>import java.io.*;
  
  public class Assignment3 //class name here, same as file name
  {
      public Assignment3() throws IOException{ //constructor, place class name here
          // use BufferedReader class to input from the keyboard
          // declare a variable of type BufferedReader
          BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
  
          //declare variable for input
          String inputString;
  
          // houseKeeping()
          String yourNumber;
          int number;
          int  totalSquare = 0;
          int totalCube = 0;
          int count;
          int badNumber=0;  
          String squareCube = " Your number squared is" +square +"your number cubed is"+cube;
  
  
          System.out.print("Enter a number: ");
          inputString = input.readLine();
          yourNumber = inputString;
      }//end constructor
  }
  
  public static void main(String [] args) throws IOException
  {
      new Assignment3(); //class constructor name
  } 
  </code></pre>