Question: Write a program (Java) that creates an array of 52 integers. The integers are mapped to the 52 cards in a deck of carts. The

Write a program (Java) that creates an array of 52 integers. The integers are mapped to the 52 cards in a deck of carts. The first 13 are Spades where 0 is Ace, 1 is 2, 2, is 3, 10 is Jack, 11 is Queen, and 12 is King. The next 13 are Hearts, the following 13 are Diamonds, and the last 13 are Clubs. Then, randomly choose a number from 0 to 51 and output what card this is. For example, 6 is the 7 of Spades, 48 is the 10 of Clubs, 11 is the Queen of Spades, and 24 is the Queen of Hearts.

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!