Question: Use integer division and modules (: 2. CardPick.java - You simulate picking one card from typical card set (52 cards for 4 suits and it

 Use integer division and modules (: 2. CardPick.java - You simulate

Use integer division and modules (:

2. CardPick.java - You simulate picking one card from typical card set (52 cards for 4 suits and it numbers from Ace to 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King] Let's set the order of suit to be Clovers, Spades, Diamonds and the Hearts. So, when you bought a fresh card and open a new box, you will have 52 cards in the order of Clover Ace, Diamond King as shown below. 0 Clover Ace 13 Spades Ace 26 Diamond Ace 39 Heart Ace 1 Clover 2 14 Spades 2 27 Diamond 2 40 Heart 2 2 Clover 3 15 Spades 3 28 Diamond 3 41 Heart 3 3 Clover 4 16 Spades 4 29 Diamond 4 42 Heart 4 4 Clover 5 17 Spades 5 30 Diamond 5 43 Heart 5 5 Clover 6 18 Spades 6 31 Diamond 6 44 Heart 6 6 Clover 7 19 Spades 7 32 Diamond 7 45 Heart 7 7 Clover 8 20 Spades 8 33 Diamond 8 46 Heart 8 8 Clover 9 21 Spades 9 34 Diamond 9 47 Heart 9 9 Clover 10 22 Spades 10 35 Diamond 10 48 Heart 10 10 Clover Jack 23 Spades Jack 36 Diamond Jack 49 Heart Jack 11 Clover Queen 24 Spades Queen 37 Diamond Queen 50 Heart Queen 12 Clover King 25 Spades King 38 Diamond King 51 Heart King Once you run your code, this looks like below; Run: CardPick + C:\Users\ilmiy\.jdks\openjdk-14.0.2\bin\java I got 6, which is Clover 7 Process finished with exit code o IR Run: CardPick 1 C:\Users\ilmiy\. jdks\openjdk-14.6.2\bin I got 21, which is Spade 9 Process finished with exit code +

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!