PLEASE CODE IN JAVA!!! WITH MULTIPLE METHODS!
Problem description
In PA11-A, you will develop class templates to represent playing a game of cards. The client program has been written and is provided for you, all you need to do is implement the Card, Deck, and Player classes per the specifications. The Card class will used to instantiate Card objects that represent playing cards. The Deck class will be used to instantiate a Deck object that represents a deck of cards. The Player class will be used to instantiate Player objects that represent players of the card game.
Copy over your implementation of the Card class (from PA11-A-Test1), the Deck class (from PA11-A-Test2), and the Player class (from PA11-A-Test3). All three classes must be copied to this section (PA11-A) for grading purposes. We will not grade any work submitted in PA11-A-Test1, PA11-A-Test2, and PA11-A-Test3.
If you implemented the three classes as per the specifications (and not just to pass the provided tests), then you don't really need to do anything else. You can download the client program into IntelliJ IDEA and try running it with your implemented classes in IntelliJ IDEA with the inputs provided in the sample runs below. As stated in previous assignments, use IntelliJ IDEA to confirm that your program's execution is identical to the sample runs.
The card game that the client program is running first asks the user for a seed value. It then asks for the number of players and the number of cards each player should get initially. Then an initial card is placed as the current playing card. The purpose of the game is to play all cards in a player's hand. Each player takes a turn to see if they have a card that they can play based on the current card that is shown. A card can be played if it either has the same rank as the current card or the same suit as the current card. If the player's hand does not contain a card that can be played, then the player draws a card from the deck. Normally, when there are no more cards on the deck, then the deck will be re-shuffled. For this program, when there are no more cards on the deck, the game ends. This means that it is possible to have no winner in a particular game.
Sample run 1
In this sample run, the seed is set to 1234, the number of players set to three, and the number of cards per player is set to two. Player 1 starts with 10 of Spades and 2 of Diamonds, Player 2 starts with 3 of Diamonds and King of Hearts, and Player 3 starts with 2 of Hearts and 6 of Spades.
The starting (or current) card is Jack of Hearts. The game starts with Player 1. Since Player 1 can't play any cards, Player 1 draws and gets 7 of Clubs. Then it is Player 2's turn. Player 2 can play King of Hearts, which means Player 2 has 3 of Diamonds left. Then it's Player 3's turn. With the current card King of Hearts, Player 3 plays 2 of Hearts and is left with 6 Spades. Going back to Player 1, with the current card 2 of Hearts, Player 1 plays 2 of Diamonds and is left with 10 of Spades and 7 of Clubs. With the current card 2 of Diamonds, Player 2 plays the only card left in the hand, which is 3 of Diamonds. Player 2 wins the game.