Computer Science 252
Problem Solving with Java

Spring 2016, The College of Saint Rose

Lecture 12: Exam Recap; More Active Objects
Date: Tuesday, March 1, 2016


Lecture 12 Assignment

Due at the start of class, Thursday, March 3.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 252 Lecture 12 Assignment, Mary Smith). We will discuss these questions at the start of class, so no late submissions are accepted.

  1. State the four key steps that are required when creating an ActiveObject. (3 points)
  2. Modify the FallingSnow example so that each snowflake (that is, each FallingSnow object) stops falling when it reaches the bottom of the canvas, but then remains on the canvas for 5 seconds before "melting". During this 5 seconds, the snowflake should move down by 1 pixel every half second, then get removed from the canvas as before.

    You need only submit your updated run method for the FallingSnow class. (5 points)