Question
Using Java create a program with the following: It should have a one-dimensional string array that contains the rank values of a deck of cards
Using Java create a program with the following: It should have a one-dimensional string array that contains the rank values of a deck of cards (Ace, King, Queen, Jack, Ten, Nine, Eight, Seven, Six, Five, Four, Three, and Deuce). Another one-dimensional string array should contain the suit values of a deck of cards (Diamonds, Clubs, Hearts, and Spades). Then create a third string array with 52 elements. Use loops and the above arrays to populate each element of this array with rank and suit combinations in a format similar to this: "Ace of Diamonds". Then randomly draw and display five cards from the array that contains the combined values. A possible outcome might look something like this: Seven of Clubs Queen of Hearts Ace of Spades Deuce of Diamonds Ten of Clubs
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