Fall 2002
Homework #56
part 1: due Mon Nov 25, in class
parts 2-10: due Mon Dec 9, 12NOON

last updated: Thu Dec 5 23:10:58 EST 2002 (sklar)


  • The early due date for part 1 is optional, but you get 1 point if you take the option and turn in part 1 on Mon Nov 25, in class.
  • The full assignment is due on Mon Dec 9, electronic submission by 12NOON. The hardcopy portions are due in my office by 5PM. (If you turn in part 1 on Nov 25, then you don't need to turn it in again on Dec 9.)

    last updated: Mon Nov 18 23:17:10 EST 2002

    The goal of this assignment is to complete your educational game, including the full client and server, user and software documentation, as well as packaging the game for installation on a Linux machine.

  • The server must be a stand-alone C program.
  • The client must be a Java application that uses a graphical user-interface OR the client can be a Java applet (instead of an application), started with appletviewer. In the case of an applet, you MUST include an HTML file to start up the applet.
  • Your client and server must communicate via sockets, as we've been doing throughout the semester.
  • ALL user interactions MUST be through the client (not the server).
  • You need to write a login portion for the client (where you ask the user to enter their username and password), which needs to be the first thing that comes up when the game starts. Once the user has logged in, you can start the game.
  • The user should have the option to play more than once or log out.
  • The user should have a mechanism for quitting in the middle.

    This assignment is worth 35 points (out of 110 this semester). Distribution of points is indicated below.

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

    1. design.(4 points)
    As usual, you need to begin with a design document. This must include a "storyboard" in which you draw the various screens in the user-interface, including the login screen. You must show the progression from one screen to another. You must indicate how errors are handled, i.e., how users are notified about errors (both system-generated and user-generated) and what happens next in the game after an error occurs (does the game end? can the user correct the situation?, etc.)
    This documentation should be 1-2 pages. The screen drawings can be done by hand or generated electronically. It must be complete -- so you need to be CLEAR and CONCISE. This portion must be turned in as hardcopy.
    This section is worth 3 points:

  • 1 point for the screen drawings
  • 1 point for designing and illustrating a logical progression from one screen to the next
  • 1 point for handling errors clearly and sensibly
  • plus 1 point for handing this part in on Mon Nov 25 (in class)

    2. write the user-interface for your game.(8 points)
    Using Java, write a graphical user-interface for the client portion of your game. This must be a Java application OR a Java applet that we can run using appletviewer. If it is an applet, then you MUST turn in an HTML file for invoking the applet.

  • Don't forget to include a login (as above).
  • You need to include GUI components.
  • You can use Swing or just plain old AWT.
  • You need to use something from the java.awt.Graphics class.
  • You need to do something advanced. For example, use animation or import images or implement user input inside a Canvas.
  • Be creative! Challenge yourself! If the user-interface is too simplistic, you will lose points in this section.
    I will give away C++ books to the three students who write the most amazing GUIs!!!
    Name the application file with your main() in it: hw56<cunix-id>.java.
    Name the applet file: hw56<cunix-id>.java and name the html file: hw56<cunix-id>.html

    3. write java software documentation for your client.(2 points)
    You need to document your Java code using javadoc. Keep in mind the discussion from class, especially which tags are required and which sections of code must be documented.
    Put the files in a directory called "javadoc" below your working directory. When you run the submit script, this directory will get picked up and submitted along with your program files.

    4. connect to the server. (8 points)
    As discussed in class on Mon Nov 11, you need to modify your server code from homework #3 so that it is a stand-alone program. Your server should receive all communications from the Java client via sockets. Your server should interface with your data file(s), as done in homework #3.

    5. add the second player. (4 points)
    To finish up the game, you need to implement a second player. This can be either (pick one):

  • (A) -- two human players OR
  • (B) -- one human player and one computer player.
    If you choose (A), then each player can start up the client application or applet, log in and play the game against each other. You must modify the server to handle two players and the interaction between them.
    If you choose (B), then you need to write a "smart" player inside the server for the human player to play against. You can write a bit of AI into the computer player if you want, especially if you have taken the AI class. If you haven't taken the AI class, you can still decide on a game strategy yourself for a smart computer player.

    6. write C software documentation for your server.(2 points)
    You need to include a header comment at the top of each file. You need to have a block comment at the beginning of each function. Include the same type of information in the comments that you are putting in your Java code documentation.

    7. use configuration management.(2.5 points)
    Create an RCS directory below your working directory. Put your Java files in that directory.
    Create a makefile that checks the Java files out of the RCS directory and builds the client. Include the automatic version tag we discussed in class and link that to the version section of the javadoc comments.
    The makefile should check the C files out of the RCS directory and build the server.
    The default target in the makefile should build both the Java client and the C server.
    Again, the submit script will pick up the RCS directory automatically. Make sure that all your files except the makefile are checked into RCS when you submit.
    This section is worth 2.5 points:

  • 0.5 points for creating the RCS directory and correctly storing your Java files in this directory
  • 1 point for the makefile, including correct use of RCS as the default source file location and the default target being the one that builds the client and server
  • 1 point for automatic version generation

    8. create an installation package.(1 point)
    You need to create an installation package for your game. We will discuss how to do this in class on Mon Nov 25.
    SEE INSTRUCTIONS posted here.

    9. write user documentation.(3 points)
    You need to write user documentation so that people will know how to play your game. Keep in mind the pointers discussed during the lecture on user documentation. This documentation should be no more than 5 pages. It must be complete -- so you need to be CLEAR and CONCISE. This portion must be turned in as hardcopy.

    10. submit.(0.5 points)
    You need to submit your program in two ways: electronically and hard copy. There is no partial credit here -- if you don't follow the submission instructions, you lose all the points for this section.

    1. electronically
      SEE INSTRUCTIONS posted here. Be sure to submit by 12NOON on MON DEC 9.
    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 my office on MON DEC 9, before 5pm. The Computer Science office gets locked at 5pm, so don't be late!!!