| |
| META TOPICPARENT |
name="CSC122SylF2022" |
15 Solitaire Puzzle
Be warned: There are a number of different games that might share the same name. Below is a brief description of the version we will work with: |
| |
-
- Card.java. This class will represent a single card. It has a "suit" and a value. Since we only care about the value, that is the only accessor. Also, cards are not allowed to change.
- Deck.java. This class will hold a deck of cards in an array. It will create a deck assuming 4 suits with the specified number of cards (identified by the constant). It can shuffle the deck, deal out one card, and display the deck.
- Phase 1: Create a Software Design Report. See: wiki page for more details as to what should be included.
|
|
< < |
-
- The system design needs to be a class UML diagram. I highly recommend using Microsoft Project. You have access to it in the lab and should be able to download in to your own windows machine. Send an email to me for more instructions on how to do that.
|
> > |
-
- The system design needs to be a class UML diagram. I highly recommend using Microsoft Visio. You have access to it in the lab and should be able to download in to your own windows machine. Send an email to me for more instructions on how to do that.
|
| |
-
- You should spend time developing a testing plan that will help you when you begin programming. Your goal will be to develop the program in steps. What is your first step? How will you test it? One test (in the middle of your development) might be to test to see if the program can determine if the game is over (without having to plan an entire game). For that you might make a small deck (say 20 cards (5 different values of 4 suits), and create a driver that creates those cards (in an order) into an array of cards and then sends that card to the deck constructor. You can then use that deck (in order) to test the game (to see if it is done). This is not the only way to test for the end of game. It is just an example to get you thinking. If you have a good testing plan, it will help you create a more bug free program from the beginning.
- The piles of cards must be implemented via a stack
- Because you will need to know if all the cards in the stack are the same (and that is not a generic stack), create a subclass of the stack with one boolean accessor that will tell you if all the cards in that stack have the same value.
|