Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really need help with this. It must be implemented in Java! This exercise has the main goal of allowing you to show off your

I really need help with this. It must be implemented in Java! This exercise has the main goal of allowing you to show off your mastery at manipulating arrays.

You will create a card deck application that allows the player to shuffle a deck of cards and play a card game that draws and plays cards until all cards in the deck have been used.

Instructions

The application must be able to perform the following tasks:

  • At the start of a new game, it shuffles all cards using a deck shuffler.
  • The player then draws X number of cards from the deck and "plays" the cards by displaying them in the UI.
  • The played cards are then added to a discard pile.
  • The player draws X new cards and repeats playing and discarding cards.
  • When there are no cards left in the deck, the game should ask the player if they want to play again.
    • If the answer is yes, create a new deck with the discard pile and start again.
    • If the answer is no, end the game with a creative message to the player.

Requirements

The application must include the following features:

  • The player must be able to continue drawing cards without errors.
  • It should include different methods for drawing, shuffling and playing cards.
  • It must include three arrays of a Card, using a custom class that includes {Title: String, Description: String}.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago