Computer Science 252
Problem Solving with Java

Spring 2016, The College of Saint Rose

Lab 9: Bouncy GUI Ball
Due: 11:59 PM, Monday, April 4, 2016

This week, you will gain more experience with Java Swing GUI components and event handlers while working with an active object.

You may work alone or with a partner on this lab. Only one submission per group is needed.

Getting Set Up

Download the a starter project with partial implementations of some of the programs from here.

Working solutions to all programs can be downloaded here.

The Bouncy GUI Ball

Your task is to complete the implementation of the bouncy GUI ball game. The provided starter code creates a simple bouncing ball active object.

You will need to make the following enhancements:

Clearly, you will need to add some GUI swing components and appropriate listeners. You will also need to plan how to get the information from the event handlers to the ball.

Bonus Opportunity

You can earn up to 5 points of bonus for enhancements to the programming assignment. Check with your instructor for point values for any enhancements you wish to attempt.

Submitting

Before 11:59 PM, Monday, April 4, 2016, submit your lab for grading. There are two things you need to do to complete the submission: (i) Upload a copy of your lab (a .7z or .zip file containing your project directory) to terescoj AT strose.edu. (ii) Demonstrate the execution of your programs for your instructor. (iii) Hand a printout of the Java files that make up the programming assignment to your instructor. (2 business day grace period for demos and printouts).

Grading

This assignment is worth 55 points, which are distributed as follows:

> FeatureValueScore
Correctness
Slider created and placed at right of window 3
Slider listener set up properly 3
Slider resizes ball correctly 3
Color picker combo box placed in bottom panel and populated 3
Combo box listener set up properly 3
Ball changes color when combo box selection changed 3
Stop button placed in bottom panel 2
Stop button listener set up properly 3
Stop button stops the ball immediately 3
Key listeners set up properly 4
Arrow keys accelerate ball correctly 5
Style, Design, and Efficiency
Appropriate comments 5
Good variable names 3
Appropriate variable declarations 3
Good use of constants 3
Appropriate formatting 1
Efficiency 2
Good overall design and methods 3
Bonus

Total

55