spring 2003
homework #1
due Mon Feb 17, by 6AM (electronically)

The goal of this assignment is to give you a chance to experiment with some advanced Java graphics programming and also have some fun prototyping the game that you will be building during the semester. As well, use this assignment to make sure that you know how to follow the submission procedures that we will be using for the rest of the semester.

This assignment is worth 10 points (out of 100 this semester). Distribution of points is indicated below.

As described in the first lecture, you will spend this semester writing an educational game. Throughout the semester, the game will get more sophisticated as you learn more. The first homework will be a simple prototype of the game, written in Java. The last homework will be a complex version of the game, with a user-interface in Java that connects to a C server which is used for communication between players and for saving game data.

You will need a customer -- preferably a child, in order to minimize the amount of knowledge engineering you will need to do for the game. (But a friend is okay too, if you don't know any children.)

A simple example (which you CANNOT use) is a flashcard game. In a flashcard game, your program would prompt the user with a question and the computer would determine if the user got the right answer or not. Suppose our customer is studying states and capitals. Your program could say "What is the capital of Massachusetts?" and would then read an answer from the user and compare the user's answer to "Boston". The program would print a message indicating if the user got the answer right or not. You would need to decide things like what the messages would be when the user provides right and wrong answers, what the procedure would be if the user got the question wrong (i.e., would s/he get another chance? if so, how many more chances?), if there would be any scoring, how many questions the user would get in a game -- things like that.

FIRST, print out the timesheet and keep track of how much time you spend doing the tasks outlined below.

1. design.(3 points)
You need to begin by sketching out a design document. The information you need to include in the design document is:

  1. A profile of your customer and his/her background with computers. Your customer must be a real person! Answer the following questions: What is your customer's name? Is s/he familiar with computers? with video games? You will need to take these things into consideration when you get to writing a user-interface for your customer. (1 point)
  2. A description of the knowledge domain that your game will cover and some idea of how you will get the information for that knowledge domain (e.g., I'll look up my states and capitals in the encyclopedia). (1 point)
  3. An outline of the rules of the game -- how do you win the game? what are the rules of play? is there scoring? how does that work? (1 point)
I don't expect you to come up with a really complex game (like chess or Risk), but I do expect you to INVENT a game and make it a little more complex than my flashcard example.
This documentation should be about 1 page, 10-point font. It must be complete -- so you need to be CLEAR and CONCISE. You MUST print out the documentation and bring it to class on the due date.

2. build a prototype.(6 points)
Write a prototype of the user-interface for your game, in Java.
You need to include a login screen. Following the login, the user should be able to play a sample game.
You can represent a small subset of your knowledge domain -- in my states and capitals example, I'd just use the 6 New England states, for example. You need to prompt the user and do something intelligent based on the user's response. You don't need to write a complex computer player -- this isn't an AI class.
Make your user-interface clear and easy to follow, but also interesting.
Your program must be a Java application (use a Frame). The main file MUST be named: hw1<yourCSusername>.java
For example, mine would be called hw1sklar.java.
(Note that this is necessary to help us grade homeworks automatically.)

3. submit.(1 point)
You need to submit your program in two ways: electronically and hard copy. This process will be the same for all homework assignments for this course, so master it NOW. Note that on this homework only, you'll get 1 point for completing the submission correctly -- 0.25 points for the timesheet, 0.25 points for the cover page, 0.25 points for the documentation hardcopy and 0.25 points for doing the electronic submission correctly.

  1. electronically
    Submission instructions coming soon.
  2. hardcopy.
    (1) Print out the homework template cover page and fill it out.
    (2) Print out the timesheet and fill it out.
    (3) STAPLE the cover page, timesheet and hardcopy of your documentation together.
    (4) Make sure your name and CUNIX ID are on all the papers you hand in!
    (5) Bring all this to class on the day the assignment is due and deposit it in the homework box at the front of the classroom within the first 5 minutes of the class (by 1.15pm).