CS0004: Programming Project 1

Assigned:January 22, 2007
Interface Due:January 29, 2007
Pseudocode Due:January 29, 2007
Final Project Due:
 Feburary 7, 2007


In this first assignment, you will implement the game of rock, paper, scissors. For description of rules (as well as history and general information), please see the Wikipedia page.

You will need to to design a form that allows three options (buttons) for each possible move: rock, paper, and scissors. Pushing a button will cause a random number to be generated, representing the computer's choice. You will then print the player's choice, computer's choice, and the winner in a listbox. Pushing any button clears the list box and plays again.

List Boxes

Notice that the project requires that you use a ListBox element which we will talk about in class shortly. If you want to read up on them before hand look at Page 462 in the book.

Random Numbers

This project also makes use of random numbers. We will look at how to get random numbers in class, but you can also read about it on Page 485.

If Statements / Blocks

We went over if statements in lecture 5, if you want to find out more information or you missed the lecture look at chapter 5.2

Interface Design

The first part of this assignment is to design the interface. This will be due on January 26, 2007 (at the beginning of class). A hand drawing will be more than sufficient, just show me how everything will be laid out. I will grade them and hand them back to you by January 28, but you will need to be working on the project during this time so please keep a copy of design for yourself.


This requires you to think through what events you need to handle in your interface and what the code will look like for each event. This will also be due on January 29th, I will return it to you my January 31st. I expect to have each event labeled and then some pseudocode written for each event. For example what will you do for a rock button click?

We will go over some designs on January 31st. At this point I will then post a design with pseudocode.


The grading sheet for this assignment is posted. The entire project is worth 100 points, the interface and pseudocode are worth 10 points each. Other items that will be graded is functionality, design, proper use of form elements, code style, documentation, etc.


There are two parts to turn in for the final project. First, you need to bring a printout of the code window to class on February 7. Second, create a zipped folder containing the entire project. Name this file Lastname_Firstname_Assignmentnumber.zip. Example: Mills_Bryan_1.zip

Don't use spaces in your filename thats just bad, not cool, and always wrong.

You then need to upload this zip file to the following location, http://www.cs.pitt.edu/~bmills/upload/ . This web page will allow you to upload your zip file only once. If you need to upload your file again add a revision number to the end of the file (ie Mills_Bryan_1_2.zip, Mills_Bryan_1_3.zip). I will grade the file with highest revision number.

Let me know if you have any problems uploading files by emailing me. I will not accept submissions turned in late some don't even try it, I have millions of little monkeys in the computer watching for late submissions.

Extra Credit

I will offer a 5 and 10 point extra credit opportunity. If you have an idea for extra credit, email me or stop by during office hours and we can discuss it. NO EXTRA CREDIT WILL BE AWARDED FOR ADDITIONS NOT DISCUSSED AND APPROVED!