Based on the class diagram and game rules provided above.generate java code and document test cases to ensure the code runsproperly.
Card name: String value: int BlueCard Green Card PurpleCard OrangeCard Blue Action Card Green Action Card Purple Action Card Action Card «interface Actionable cardPenaltyo: ind Wham Bam! A card game invented for ITECH2309 by Amy Meade. Inspired by UNO by Mattel. Number of Players: 2-4 Objective: Be the first player to get to 300 points. Points are earned by totalling the value of all cards left in play at the end of each round and assigning these points to the winner of the round. Materials: Deck of 88 cards, comprising: • 76 General cards numbered 0-9 and in four different colours: Blue, Green, Purple, Orange. 1 card numbered o in each colour; cards numbered 1-9 in each colour. 8 Wham! cards, 2 in each colour. . 4 Wham Bam! cards, all coloured White Setup: Shuffle the entire deck. Deal each player one card. The person with the highest value card goes first. Value is determined by the face value of the numbered cards, with Wham! cards being worth more than any numbered card, and Wham Bam! cards having the highest value of all. All cards are then returned to the deck and it is shuffled again. Deal each player 5 cards, face down. Reveal the top card of the deck and place it in play. Game Play: Players take it in turns to take one action in response to the card on top of the play pile. Play moves in a clockwise direction. If the top card is: A NUMBERED CARD: Player chooses and plays a card from their hand that matches the top card in either number or colour. If they do not hold a matching card but hold a Wham Bam! card, they may play this. If they do not hold a matching card and do not hold a Wham Bam! card, they must pick up a card from the deck and immediately end their turn. A WHAM! CARD: Player must pick up 3 cards from the deck to place in their hand. The next card in the deck is then placed face up in play A WHAM BAM! CARD: Player must pick up the next card in the deck, which then becomes the top card in play. If this card is: • a Numbered Card, then the player must pick up the number of cards that matches that value and place them in their hand. • a Wham! card, then the player must pick up 3 cards and place them in their hand. • a Wham Bam! card, then the player must pick up 9 cards and place them in their hand. The round comes to an immediate end, with the current player losing the round. A round of play continues until either one player has played all the cards in their hand, or a player has been eliminated from the round via the Wham Bam! card play. At the end of the round, the game is scored. If neither player has reached 300 points, then a new round is dealt following the rules in Setup. Scoring: The value of all remaining cards in play is added up and allocated to the winning player's cumulative score. Card values are: GENERAL CARDS: The number / face value of the card. WHAM! CARDS: 10 points. WHAM BAM! CARDS: 15 points.