Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A deck of playing cards consists of 52 cards divided into four suits: hearts, clubs, diamonds, spades. Within each suit there are thirteen cards, labelled
A deck of playing cards consists of 52 cards divided into four suits: hearts, clubs, diamonds, spades. Within each suit there are thirteen cards, labelled 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A. For this assignment you'll need to create two classes, Deck and Card. The deck should use an ArrayList to hold the list of cards. Your Deck class needs methods which performs the following: Last Modified: 08/28/17 Prints every card in the deck Shuffle the cards in the deck (randomly swapping every card in the deck) Add a new card to the deck Remove a card from the deck (the first card stored in the ArrayList object) Sort the cards in the deck ordered by name Include a main method in your Deck class which validates the methods you made. Save your solution in files named Deck.java and Card.java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started