I'm stuck on a portion of the Java tutorial, specifically this exercise. The exercise asks you to:
1- Write a class whose instances represent a single playing card from a deck of cards. Playing cards have two distinguishing properties: rank and suit. Be sure to keep your solution as you will be asked to rewrite it in Enum Types.
Hint: You can use the assert statement to check your assignments. You write:
assert(boolean expression to test);
If the boolean expression is false, you will get an error message. For example,
assert toString(ACE) == "Ace";
should return true, so there will be no error message.
2- Write a class whose instances represent a full deck of cards. You should also keep this solution.
3- Write a small program to test your deck and card classes. The program can be as simple as creating a deck of cards and displaying its cards.
I'd really like to do this exercise, but the problem is I have never played cards so I have no idea at all how to create this program and what properties the cards should have, etc. I looked this up on wikipedia but got very limited knowledge, which will never enable me to build the required classes: Card.java , Deck.java , and the program DisplayDeck.java.
What will be a good alternate exercise to do for someone with no knowledge of cards, but which will test the same concepts that the above mentioned exercise would? (Probably static and instance variables and such)
Thanks.
By the way, this not a homework question, i'm learning Java for a commercial project.