Computer Science 252
Problem Solving with Java
Spring 2016, 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 demonstrate your program or submit only the file BlueRain.java by email before you leave class. Email submissions should use a meaningful subject line, clearly indicating the course number and assignment name.
Due at the start of class, Thursday, April 7.
Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT strose.edu by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 252 Lecture 19 Assignment, Mary Smith). We will discuss these questions at the start of class, so no late submissions are accepted.
Write a method that takes an ArrayList of FilledOval values as its parameter and returns the sum of the heights of all of the in the ArrayList. (5 points)
Terminology
Examples