|
Project #1 (Blackjack) |
CMSC 132 |
|
Due Date: Fri Sep 15, 6:00 pm |
Object-Oriented Programming II |
|
Type of Project: Open |
Fall 2006 |
Objective
This project will give you practice using ArrayList, and programs that use the MVC (Model-View-Controller) model of interaction.
In case you have not already noticed, this is an Open assignment. You must read the Open/Closed policy before working on this project. The policy can be found at policy.
Overview
For this project you will write a class named Blackjack that implements the game logic associated with a blackjack card game. The Blackjack class implements the BlackjackEngine Java interface whose definition you can find in the project's javadoc documentation.
Grading:
Tests (75 %)
Public JUnit tests (40 %)
Release JUnit tests (25 %)
Secret JUnit tests (10 %)
Student Tests (10 %)
Style (15 %)
For this project:
Even if you are not planning to work on the project for a while make sure that:
You can compile a simple class using the provided code distribution. If you have problems compiling a simple class see your TA immediately.
Submit your project using the "Submit Project" option in Eclipse and verify your submission has been received in the submit server. It is important that you submit your project using the "Submit Project" option rather than uploading a jar file to the submit server. If you are having problems with this submission process, contact your TA or instructor immediately.
You must debug your code using the Eclipse debugger and should not use "System.out.println" as a debug tool. The TA in office hours will require you to use the debugger to show any problems you are experiencing.
Code Distribution:
The project's code distribution is available by checking out the project named p1. The code distribution provides you with the following:
Blackjack Rules
If you have been to Vegas then you are familiar with the rules to play blackjack (also known as 21). However, what happens in Vegas stays in Vegas, therefore the rules for blackjack in this project are different. If you want to familiarize yourself with the game, check the online blackjack game available at: http://javaboutique.internet.com/BlackJack/index.html. Note that the rules we will use are not exactly the same ones used in this online game.
In our blackjack version we have a dealer (person who shuffles and distribute cards) and only one player. The game's objective is for the player to beat the dealer by generating a hand of cards whose value is higher than the dealer's hand without exceeding a total value of 21. The game starts by the dealer shuffling cards (one or more decks) and dealing two cards to the player and herself/himself (the actual order is described in the project's javadoc documentation). One of the dealer's cards will be face down. At this point the player will ask for cards until he/she understand it can beat the dealer with the current hand and as long the cards' total value does not exceed 21. If the hand of cards does not exceed 21, and the player stops requesting cards (what is refer to as "stand"), then the dealer will flip the card that was face down, and proceed to deal cards to himself/herself as long as the cards' value is less than 16 and does not exceed 21. If a value greater than 21 is generated the player wins. Otherwise whoever (player or dealer) has the hand with the highest value will win the game.
The following provides additional information about the game:
Requirements
Project Requirements
Style Requirements
Honor Section Requirements
For those students in cmsc132H your project should satisfy all the requirements specified above and in addition you should treat this project as a closed project.
Submission
Submit your project using the submit project option associated with Eclipse.
Academic Integrity
Please make sure you read the academic integrity section of the syllabus so you understand what is permissible in our programming projects. We want to remind you that we check your project against other students' projects and any case of academic dishonesty will be referred to the University's Office of Judicial Programs.