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

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!