Adapted from http://www.bluej.org/resources/exercises/shapes-lab.zip by Bruce Kahn
Click on the Circle box, right-click it and choose new Circle() and then click Ok. You have just created (instantiated) your first object! The circle_1 object is placed on the object bench.
Right-click the circle object (on the bench) and choose Inspect to invoke the Object Inspector. The fields listed under Object Fields are the objects attributes. Attributes define an object and are generally described by nouns. The set of all values of all attributes define an objects state.
When you right-click the circle object, all the objects methods (behaviors) are listed above Inspect. Methods allow you to move and modify the object. Methods are generally described by verbs.
What is the value of isVisible ? _____
Right-click the circle object and choose makeVisible().
What is the circle’s (x, y) position? _______
Right-click the circle object and choose moveDown().
What is the circle’s (x, y) position? _______ What do you expect it will be if you invoke the moveDown() method again? _____ Were you correct?
Invoke the circle’s moveRight() method. What is the circle’s (x, y) position? _______
Change its color.
What happens when you invoke the changeColor method, and write the color into the parameter field without the quotes?
What happens when you specify a color that is not known?
Change its size to 10.
Invoke the moveVertical() method and enter: 10. What happened to its yPosition?
How could you get the circle to move up?
Move the circle so it is at the upper left hand corner of the canvas.
What do you think the coordinates of the upper left hand corner are? ( ____, ____ )
Move it to the lower right corner of the canvas.
What do you think the coordinates of the lower right hand corner are? ( ____, ____ )
Position the circle to the center of the canvas