Computer Science 252
Problem Solving with Java

Fall 2015, The College of Saint Rose

Lab 10: Final Project
Proposal Due: 11:59 PM, Thursday, November 12, 2015
Design Due: 11:59 PM, Thursday, November 19, 2015
Program Due: 4:00 PM, Friday, December 11, 2015

This lab serves as a final programming project for the course. You are to propose, design, and implement a program that is interesting to you to demonstrate what you have learned this semester. You have a great deal of freedom in choosing what to program for this project. However, it must be an effective demonstration of your skills. More details can be found below.

This project will count for 150 points, about twice as much as a typical lab. See the "Grading" section for details.

Ground Rules

You may work individually or in a group of 2 or 3 on this program. While you may ask for help from your instructor or from the tutors in the Academic Success Center, that help will be more limited than for regular lab assignments. Additionally, any help you receive must be clearly documented in the comment at the top of your program (i.e., who helped you and exactly what that help was). If you work in a group, you will be required to include a detailed breakdown of who was responsible for which parts of your design and implementation. Group projects will earn a single grade, except in the rare situation where it becomes clear that a group member has not contributed significantly to the project. Also, the scope of the project is expected to be larger if you are working in a group.

Requirements

You may find it difficult to estimate the programming effort that will be required for programs you are considering. Please discuss ideas with with me before going too far.

Your project should showcase many of the programming skills you have worked on this semester. Projects of an appropriate scope will very likely include several of the major ideas and constructs we have seen this semester (graphics primitives, mouse/keyboard event handling, custom classes, active objects, Swing GUIs, recursive structures and methods, ArrayLists/arrays) as well as most of what you knew coming in (conditionals, loops, random numbers, files, methods). Using the material covered late in the semester is encouraged, and will likely make for a more fun and interesting project, but this is not a requirement. You are also welcome and encouraged to make use of Java constructs and parts of the Java API that we have not used this semester, but check first.

There are two preliminary items to submit for this project.

Proposal

By 11:59 PM, Thursday, November 12, 2015, submit a written proposal (by email or in hard copy), a few paragraphs long, describing your intended project. Clearly state what your program should do and which programming constructs you expect to use to complete your project. Please submit earlier if you can, so I am not overwhelmed with submissions at the deadline. I will make every effort to read these and give you feedback immediately. Once your proposal is accepted, your grade for the functionality portion of the project will be based on how well your submitted program matches what you proposed.

Here is a sample of an appropriate proposal.

For my final project, I plan to design and implement a version of the game "Gemz", a form of a sliding puzzle game. The game is played on a two-dimensional grid, with each grid entry occupied by a "gem" of a certain type. When three, four or five matching gems form a vertical or horizontal line, that group is considered a match, and those gems disappear, earning the player points. Gems above the matched slide down to occupy the vacated spaces. If there is no gem above to slide into place, a new randomly chosen gem is created for that entry. The game is played by the user sliding (dragging, in our terminology) one gem into a neighboring space (the grid entry immediately above, below, to the left of, or to the right of it) to create a row or column of three, four, or five matching gems. If the gem is dragged to a location where a new match is created, the gem in the original spot and the one adjacent are swapped, and any matches created are detected, removed, and points awarded. This process continues until time expires.

The project as described above would form a basic, playable version of the game. If time permits, additional features such as multiple levels and special "bomb" and "crystal" gems, which allow large groups of gems to be consumed for extra points, and other features will be implemented.

This project will bring together many of the topics we have studied this semester. The main program will be a WindowController class that creates the game board. It will use the standard Objectdraw mouse event handlers. There will also be at least one Swing GUI component and a listener for that component's events. A two dimensional array will be used to hold the gems. This array will be contained in a custom class, so that the mouse event handlers do not need to handle all of the complexity of the game play as it relates to the set of gems. Finally, there will be an ActiveObject class that will manage the timer.

Design

By 11:59 PM, Thursday, November 19, 2015, you are to submit (by email or in hard copy) a detailed design of your program, similar to those required for some of the lab assignments this semester. The design should list all of the classes that will make up your program, clearly indicating the purpose of each and if it is a "special" class like a WindowController or an ActiveObject. Include a list of the major instance variables you will use in each class and the methods you will need to implement. For each method, clearly indicate its parameters and return type and give a brief description of what the method will do and how it will do it. If any of your classes will involve the layout of graphical objects on the canvas, include drawings labelled with important coordinates and dimensions.

An example design for the program described above will appear in this space at a later time.

Some Ideas

For a course such as this, where we deal with graphics and event driven programming for so much of the semester, final projects are often video games, but they do not have to be. Along those lines, the following are games that have been successfully implemented using Objectdraw graphics and/or Java Swing components.

You could also do a greatly enhanced version of a game we used as an example or implemented in a lab earlier this semester such as Pong, Breakout, or Furious Fowl. Again, there is no requirement that your project must be a video game. Even if it is, do not limit yourself to the above list by any means. Have a look at your favorite list of old Atari games or check for games in your favorite app store for lots of ideas.

Have fun and good luck!

Submitting Your Work

Before 4:00 PM, Friday, December 11, 2015, submit your lab for grading. There are three things you need to do to complete the submission: (i) upload a copy of your Java program (a .7z or .zip file containing your project directory) using Submission Box under assignment "Final", (ii) print a copy of your program and hand it to your instructor, and (iii) demonstrate the execution of your program for your instructor (2 business day grace period for demos).

Don't forget to check your programs for compliance with the Style Guide for CSC 252 Programs

Grading

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

> FeatureValueScore
Proposal (10 points)
Proposal text description 5
Proposal list of programming constructs 5
Written Design (20 points)
Major constructs and their purposes specified 4
Major classes/variables specified 6
Method signatures 5
Detailed method descriptions 5
Program Design, Efficiency, Style (50 points)
Appropriate comments 10
Good variable names 5
Appropriate variable declarations 6
Good use of constants 6
Appropriate formatting 3
Good overall design (classes and methods) 10
Appropriate use of language constructs 5
Efficiency (e.g., not reconstructing objects unnecessarily) 5
Program Correctness (70 points)
Determined by Grading Contracts

Total

150