Card Game
Our task was to create a card game using the Java language.
Stage 1 Using classes, ArrayLists and methods, we had to create a deck of Cards, using the following classes:
CardGame
• - Contains an ArrayList
• - Has a name which is also defined in the constructor.
• - Has a getDeck method that lists out the cards in the deck.
Card
• - My card class
• - Has a String symbol (2,3,4,5,6,7,8,9,10,J,Q,K,A)
• - Has an int value (2,3,4,5,6,7,8,9,10,11,12,13,14)
• - Has a toString method that describes the class
Stage 2
I created a CardGame Class where I had implemented all the methods that I used to achieve the following:
• Card dealCard() - takes the card from the top of the deck and returns it
• ArrayList
• ArrayList
• ArrayList