Computer Science 225
Advanced Programming
Spring 2022, Siena College
Class Examples
Class examples will be linked below. Please report any missing examples.
- Administrative
-
- Review
-
- Interfaces and Inheritance
-
- GUI and Event Handling
-
- Spatial Data Structures
-
- PointSet2D: spatial data structures including an adaptive quadtree
- Event-Driven Programming
-
- 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
- UglyDragABall: dragging an object with the
mouse, but a little ugly
- DragABall: dragging an object with the
mouse, better
- DragMany: drag any of many objects,
including a custom class to represent the shapes we drag
- Animation and Threads
-
- Keyboard Events
-
- ArrowBall: handling keyboard events, in this case arrow keys, in a graphics program
- More Animation and Threads
-
- Packages
-
- TwoTimers: a class conflict from wildcard imports
- ThreadGraphicsPackage: creating your own package, base classes to factor out some code common to graphics animations
- Animation with Collisions
-
- Breakout: a game using collision detection, built using the package above
- Files and Exception Handling
-
- FileMethods - demonstrate some methods of java.io.File
- CatchExamples - demonstrate try..catch..finally, including with resources
- Matrix2D - user-defined exceptions
- Java Odds and Ends
-