Homework 5


Review

Write a program that draws circles at the mouse's position.

Now, make it so the circles are randomly colored.

[Hard] Write a program that draws one circle, starting on the left
side of the screen and moves the circle slowly to the right side of the screen

Write a program that prints all the numbers between 2 and 50.

Arrays

Create an array of four Strings. The Strings in the array should be
"Pythons", "make", "awesome", and "pets".

Next, set the third element in the array to be the string "amazing".

Write a loop that prints out all of the Strings in the array.

Create an array of 50 integers.

Use a loop to set each of the elements in the array to their index.
Example :
array[0] should equal 0
array[1] should equal 1
array[49] should equal 49

Write a second loop to print out all the elements in the array.

Classes

Create a new class called Apple. Apple should have the following properties :
an integer called size
a String called type
a boolean called isRed.

Create 2 instances of that apple class. Apple a and Apple b.

Set the size of Apple a to be 100 and the size of Apple b to be 200.