Menu

[Solved]Java Programming Write Class Named Card Represent Card Deck Cards Card Suit Face Value Sui Q37172276

JAVA PROGRAMMING

Write a class named Card which will represent a card from a deckof cards. A card has a suit and a face value. Suits are in orderfrom low to high: Clubs, Diamonds, Hearts and Spades.

The card values from low to high: 2, 3, 4, 5, 6, 7, 8, 9, 10,Jack, Queen, King, and Ace. Write a Deck class that contains 52cards.

The class needs a method named shuffle that randomly shufflesthe cards in the deck. It also needs a method to deal one card at atime. Write a CardPlayer class. This class should keep a

list of card objects. (The class represents a hand of cards.)This class should have a method getCard, that accepts a referenceto a card object and adds it to the CardPlayer. The class

should also have a method named showCards that will display allof the cards held by a CardPlayer object. Write a separateDemonstration that creates a deck of cards, creates two

CardPlayer objects, deals 5 cards to each CardPlayer object, oneat a time, and displays both hands.

Expert Answer


Answer to JAVA PROGRAMMING Write a class named Card which will represent a card from a deck of cards. A card has a suit and a face… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *