Im just new in programming.
and our trainer just gave us this problem.
can u help me with this?
Create a Java program that will do the following functions:
1. Create a 52 card deck with the following values in descending order:
suit: diamond, heart, spades, clubs
face: ace, king, queen, jack, ten, nine, eight, seven, six, five, four, three, two,
2. The cards will be placed in a stack and shall serve as the initial content of the deck.
3. The program should be able to shuffle the initial content of the deck. The number of shuffles will be an input parameter.
4. Deal the shuffled content to x no. of players .
5. Each player then plays the first card that was stored in his own stack.
6. The values of each card played are then compared. The player who owns the highest card, gets the other 3 cards and places all of the cards at the bottom of his stack.
7. The next top card from each player's stack are then played. Do step 6.
8. Perform steps 6 and 7 until one player has all 52 cards in his stack.
Outputs:
1. Display the content of the deck before the start of the shuffle and gameplay.
2. Display the content of the stack of the winning player