Hailstone Lab
Make these objects work as described using the starter code on your drive:
- The Set button:
- IF there is a number in the textField that is >0,
- set number to the value in the textfield.
- otherwise
- randomly choose a number from 1-100 and display it on label 1
- set count to 0
- display number on label 1
- display Iterations: 0 on label 2
- The Next button:
- change number to half the number if it was even and 3X number + 1 if odd.
- display number on label 1
- add 1 to the count
- display count on label 2
- Quit button: ends the program:

Top score:
- IF number is a 1,2 or 4, display a message in bright red that says HAILSTONE! to show that you've reached the infinite hailstone loop.
- Remove the message when the quit or set button is clicked.
- If count is > 10, display a message in green that says LONG SEQUENCE.
- Remove the message when the quit or set button is clicked.
Checking to see if there is any input:
String input = box.getText(); // get the text out of the text field named box
if(input.length()>0){ // if there is something in the box
number=Integer.parseInt(input);} // turn it into an int
else{ //otherwise
number =(int)(Math.random()*100)+1;} //generate a random number