Computer Science 252
Problem Solving with Java
Spring 2015, The College of Saint Rose
Agenda
Write a program called BlueRain.java that creates a small blue FilledOval each time the mouse is pressed on the canvas, and stores a reference to that FilledOval in an ArrayList. Then, each time the mouse moves on the canvas, every FilledOval in the ArrayList should move down by 1 pixel.
When the mouse exits the window, the canvas should be cleared and the ArrayList emptied. Note that this could be accomplished by constructing a new ArrayList, but it would be more efficient to call the existing ArrayList's clear method.
Please submit only the file BlueRain.java in Submission Box under "InClass18" before you leave class.
Due at the start of class, Tuesday, March 31.
Please submit answers to these questions in Submission Box under "LA18" or in hard copy by the start of our next class. We will discuss these questions at the start of class, so no late submissions are accepted. Please be sure that your name is clearly indicated in all submissions.
In the example BroccoliBetter, add new method headers for moveTo and removeFromCanvas to the BroccoliPart interface and implementations of those methods to the classes that implement the interface. (10 points)
Terminology
Examples