Program 3: BlackJack Simulation

Due Date

This assignment is due at the beginning of your lab period on Thursday, March 11th.

Partners

You may work with at most one other person on this assignment. Your partner must be in the same lab section as yourself. Please review the class collaboration policy (available off of the main CS 221 page) so that you know what is and what isn't allowed.

Purpose

The purpose of this program is to give you experience with the linked list implementation of the list ADT.

Assignment

In this assignment, we want to simulate a BlackJack dealer in Las Vegas. In the game of BlackJack, the dealer must draw until she has a score of 17 or higher. An ace can count as either 1 or 11, a king counts as 10, a queen counts as 10, a jack counts as 10, and all other cards count at face value. If the dealer's score exceeds 22, the dealer busts and loses so the dealer tries to make her cards count between 17 and 21 if this is at all possible.

The goal of the simulation is have the dealer play 100,000 different hands and to figure out (1) how many and (2) what percentage of hands end up with each of the following scores: 17, 18, 19, 20, 21, 22, 23, 24, 25, 26.

General Requirements

What to Submit

  1. A disk with your code on it. This is important as your program will be tested in lab on Thursday, March 11th.
  2. A printout of the source code that you write.
  3. A printout of the output that your program sends to the BlueJ terminal output window.

Grading

Valid XHTML 1.0!