Computer Science 252
Problem Solving with Java
Spring 2014, The College of Saint Rose
Agenda
Modify the Drag10Shirts example so that each TShirt object created has somewhere between 2 and 6 "stains" placed randomly on it. Each stain is a single graphics primitive (e.g., a FilledOval), and those stains are stored in an ArrayList within that TShirt, so that the stains move with the TShirt. You can earn full credit if all stains are the same size, color, and shape, but can earn up to 10 points of extra credit for more "interesting" stains.
Please submit only the file TShirt.java in Submission Box under "InClass20" before you leave class.
Due at the start of class, Tuesday, April 15.
Please submit answers to these questions in Submission Box under "LA20" 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.
Write a method that takes an ArrayList of Integer values as its parameter and returns the sum of all elements in the array. (4 points)
Examples