HOME | Overview | Syllabus | Instructor | Lectures | Laboratories | Readings | Assignments | Resources | Other Links
CS 1713 Lecture 25: Group Design Project I
Simulating the Game of Craps
October 27, 1999

In this class period we will be doing our first "group design" project. Your group will be determined by lottery. I will hand out the specification and you will spend the class period writing the code for it. You will hand in what you have written at the end of the class period. Please include the names of the group members and your group number. I will grade your design and return a copy of the graded design to each member of the group. The grade will be counted as part of the "group design" grade. During the class, I will walk around and answer questions from individual groups. I will also make notations about your "group dynamics". It is important that you interact in a positive way. Most software projects are done in teams. Some members will be stronger technically than others. As a team member, you need to help other members of the team see the overall picture so that everyone can contribute. You do not need to have a "perfect" solution to get full credit for this assignment.

Simulating the game of craps: In one version of the game of craps, a player rolls two dice.

You are to design a class that simulates the game of craps. The class uses two 6-sided dice to play the game. The class will have one public method playGame that simulates playing the game and returns a boolean value indicating whether the game is won (true) or lost(false). playGame.

Write the client code (main program) necessary to play the game 100 times and print the percentage of wins and loses.

Write a second main program that will perform 10 experiments as follows: An experiment consists of counting how many games of craps have to be played before a win. Compute the average number of games (over the 10 trials) that have to be played before a win.


Last Revision: October 27, 1999 at 2:10 pm