Computer Science 252
Problem Solving with Java
Spring 2014, The College of Saint Rose
Agenda
We will design and implement a Java applet that lets us play with cars. There will be 3 cars, each of which is a different color. We can drag the cars around. When they are dragged to the dark part of the canvas, their headlights are turned on. When dragged to the light part of the canvas, their headlights are turned off. When the mouse exits the canvas, each car becomes grey, but only if its headlights are off. When the mouse reenters the window, each car returns to its original color.
Due at the start of class, Tuesday, February 10.
Please submit answers to these questions in Submission Box under "LA8" 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 loop that would draw the following "staircase" on the canvas (5 points):
Examples