Assignment 1: OOA&D Basics and Brickus GUI Application

The purpose of this assignment is to refresh your Java coding skills get experience with Java GUI coding if you have not yet done any, and to refresh your basic OO design knowledge, by

For the book self-study, also be thinking about how some of the principles covered in the book can be applied to the programming part of the assignment. The Java GUI progam is pretty simple, but here are some topics covered in the book which are relevant:

Requirements for Brickus

The notion of requirements are covered in Chapter 2 of the book. For this assignment we will give you some pretty detailed requirements.

The assignment is to write a program that allows two players to play a simple hotseat puzzle game named Brickus. Gameplay is conducted on a grid with fixed-shape pieces which may be flipped or rotated before being placed. Each player takes turns placing pieces with the objective of occupying more squares on the board than their opponent. The following is a breakdown of gameplay rules:

Resources

You are strongly encouraged to use a professional IDE (such as NetBeans or Eclipse) to complete your coursework; your familiarity with such a tool will be required for future assignments. You are also required to properly document your sources and, as this assignment must be completed in Java, you should use JavaDoc to do so. See the Course CASE tools resources page for an overview and pointers to information on how to use Eclipse and JavaDoc.

You will also need to download the Brickus assignment framework, as it is a necessary portion of the project. It contains the following resources:

To run the provided implementation of the game, you need only invoke the edu.jhu.cs.oose.fall2009.brickus.viewcontroller.StandardBrickusMain class when all three provided JARs are on the classpath. To control the provided UI, use left-click to select (or place) a piece, right-click to flip a piece, and the scroll wheel to rate the selected piece. Holding shift while flipping the piece causes it to flip in a different direction.

Part I: Model Only

You will write this assignment in two parts. The first part consists of the model for your application; the second part consists of your user interface. The assignment must be written in Java and must run properly with the provided libraries.

The objective in this part of the assignment is to implement the logic of the game; you will be using a provided user interface to do so. You must provide correct implementations of the BrickusModel and BrickusPiece classes. Furthermore, your model must have a no-args constructor. You can test your implementation with the provided JAR files by putting your compiled implementations on the classpath instead of the BrickusDefaultModel.jar. After doing so, invoke the provided Brickus GUI by specifying the fully-qualified name of your model class as the first argument. For example:

java -cp BrickusInterface.jar:BrickusDefaultUI.jar:bin/ edu.jhu.cs.oose.fall2009.brickus.viewcontroller.StandardBrickusMain edu.jhu.cs.myjhedid.oose.brickus.MyBrickusModelClass

HFOOA&D Assignment along with part I

Part II: GUI

For this part of the assignment, you will write the view and controller of the application. These two parts together comprise what is traditionally considered a user interface. The UI allows the user to interact with the model in a meaningful way (and without having to know how to program!). Your UI must have the following properties:

HFOOA&D Assignment along with part II

Submission Instructions

We will be using WebCT to submit assigmenents. You are automatically enrolled in the WebCT page for the course via the registrar. One aspect of this system is if you have not yet offically added the course, you won't be able to turn in assignments. So please add the course as soon as possible.

You can log in to webCT via webct.jhu.edu using your JHED ID and password. After logging in you will see a list of courses, hopefully including OOSE, which you select. If OOSE is not listed, it means you are not enrolled as far as the registrar is concerned. The assignment submission process involves uploading the files, and it should be fairly self-explanatory.

Required submission items:

All of your solutions should work in the Sun Java 5 or 6 SDK.

Grading Criteria

Score Calculation

The first part of the assignment is graded 75% on correctness and 25% on style. The second part of the assignment is graded 50% on correctness, 25% on style, and 25% on the appeal of the user interface. The second part of the assignment also affords some opportunity for bonus credit. The course style requirements apply.