← Questions

Deck of cards with shuffle, draw and sort

0
AppleOO designLast asked Mar 2026

Model a deck of playing cards with classes for cards and the deck. Implement a fair shuffle (every order equally likely, Fisher-Yates), drawing cards, and putting the deck back in order by rank and suit. Discuss how you would test that the shuffle is fair.

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing