CPE 101:
Fundamentals of Computer Science 1


Spring 2003
(Sections 02 & 03 only)
Program # 3
Due by 9 pm, Sunday, of Week # 5.


Task Navigation Links:
| The Basic Task |
| Program 1: The Minimum Required | Program 2: Aiming Higher ... |
| Some Reminders | Submitting Your Work |

The Basic Task

For your third programming assignment, you will implement a couple of variations on a "slot machine" simulation.


Part 1: the minimum required.
Program 2: Do this part too, to be eligible for a higher grade.

For this part, you will write an applet that must be named SlotApplet.java and be called by a web page that must be named SlotApplet.html. It is to do the following:

In addition to the specific rules of the slot machine operation described above, here are a few additional conditions on your assignment:

Notice that this applet requires you to isolate the part of your previous work that generates and displays the results of a game, and convert that to an applet. Nonetheless, large portions of your code from the program in part 1 should be re-usable, or easily modified, for this program. You should make sure that your code is now as accurate, efficient, and well-documented as you can make it. While you're at it, do any additional clean-up that may be needed, including but not limited to:


Some Reminders

There are several things you can do to prepare for the applet part of this assignment:

Needless to say, your grade (on both parts) will depend on whether your code works as specified, and whether it meets the various standards from previous assignments, class discussions, textbook guidelines, and course expectations. Thus, for example, you are expected to include appropriate documentation, follow standard naming conventions, use indentation and whitespace, develop a neat and efficient design, and implement it cleanly. You are expected to demonstrate capability with the various tools we have covered so far in class, including but not limited to the appropriate use of selection and loop structures, primitive data types, objects, and methods. If you can't get something to work as requested (even after using the various sources of help available to you), document what you have tried and what you know about why it has failed. You won't get full marks for that, but you will lose fewer points than you would if you submit a program with any fairly obvious problem(s) to which you appeared to be oblivious.


Submitting Your Work

Use the "handin" facility available from your Central Unix account on Polylog1 to submit these required files:

It is expected that your source code will contain full internal documentation. Use the standard comment block at the beginning of the program for your design specifications and other general information. Use comments throughout your programs to clarify to anyone reading your program what you are doing at each step along the way. If you have additional comments to make, you may submit a supplemental README document, in plain text format, but its existence must be documented in the program file you submit.

Remember, the use of "handin" is described in a separate information sheet, supplemented by a FAQ. There also exists a page of general guidelines for completing your programming assignments (which documents the one unwavering rule: to receive any credit at all for the assignment, your program must compile in our lab environment!)

Copyright © 2000. by Carol Scheftic. All rights reserved. Used by permission.
Requests to reuse information from this page should be directed to Carol Scheftic.
Page created 1 April 2001; last updated 10 July 2001.