Question: programming language JAVA 1. Implement a Game class that represents a card game. This Game class must include: a. An instance variable that represents the

programming language JAVA

1. Implement a Game class that represents a card game. This Game class must include:

a. An instance variable that represents the number of players in the game (should be passed in as a parameter).

b. An instance variable that represents the maximum number of cards that can be in each players hand (should be passed in as a parameter).

c. An instance variable for the deck of cards used in the game.

d. An instance variable that is an array of the players card hands.

e. A method getCard() that deals one card to each player in the array of players (item c). When a player gets a new card they should immediately add this card to their hand so that they are ordered correctly by suit (item 1).

f. Note that the player must immediately insert each new card into the correct position in their hand. The player cannot wait until they have received all of their cards and then sort the cards.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!