Computer Science 225
Advanced Programming
Spring 2022, Siena College
Lecture 10: Event-Driven Programming; Quadtrees and Traversals
Date: Monday, March 7, 2022
Agenda
- Announcements
- Grading updates
- Lab 5: Java Graphics and Mouse Events (in Canvas and GitHub) due the day
before your lab meeting this week
- Problem Set 4 due tonight, tomorrow if you were an active
participant in the Hackathon
- Sign up to volunteer at the High School Programming Contest, April 8
- see the email from Dr. Cotler
- if we get over 90% participation from our class, we will
have an across-the-board 1-point final average bonus
- Art project voting results
- More interesting event-driven programs
- Spatial data structures
- In-class exercise (2 points): draw the quadtree that results
from the addition of the 10 points in the SmallTest program in
the PointSet2D example
- an implementation based on an adaptive quadtree
Terminology
- terminal quadrant
- adaptive
Examples
- MouseDroppings: basic mouse event handling
and maintaining a list of objects to redraw
- SpiralLines: dragging to draw spiral shapes
- SunAndMoon: move/drag events to affect the
state of objects displayed
- PointSet2D: spatial data structures including an adaptive quadtree