Computer Science 252
Problem Solving with Java
Spring 2016, The College of Saint Rose
Lecture 9: Custom Classes Wrapup
Date: Tuesday, February 16, 2016
Agenda
- Announcements
- Exam 1 a week from Thursday, during class
- topics covered are up to custom classes and the memory diagrams from last time
- coming Thursday: practice exam questions
- interest in a review session next Tuesday, probably 6 PM?
- Lab status:
- Quick recap of In-Class 8
- Lab 6: Flowers out
- In-class Exercise 9 - (20 lecture assignment
points) due before our next class.
Write a program that allows the user to interact with two robot heads
that look something like this:
Your program should have a custom class called RobotHead that
represents one of the heads, and a WindowContoller class called
RobotHeadGame that manipulates the robot heads as follows:
- When the game starts, the robot heads are created at two
arbitrary locations on the canvas.
- The robot heads are draggable, and while being dragged, their
mouths open a little wider. When the dragging ends, they go
back to their normal dimensions.
- When the mouse moves over a robot head (not a drag, a regular
move), the robot head's eyes disappear. When the mouse moves off
the robot head, the eyes reappear.
Please demonstrate your program or
submit your Java files by email before you leave class. Email submissions should use a meaningful
subject line, clearly indicating the course number and assignment
name.
No New Lecture Assignment
However, the in-class exercise above is kind of like a lecture
assignment in case you prefer to work on labs during class time.
Also, the design for the new lab is due next class.