Design a Standard Deck with Shuffle and Sort
Model a standard deck whose shuffle and explicit sort operations preserve every unique card.
Design the low-level object model and interfaces for a standard deck of playing cards with shuffle and sort operations.
For this exercise, assume the standard deck contains exactly 52 unique cards: one card for every combination of four suits and thirteen ranks. Construction from a supplied card collection validates completeness and uniqueness.
Shuffle uses an algorithm that produces a uniform permutation when the caller supplies independent uniform bounded random draws; tests may supply deterministic draws for reproducibility. Sort receives an explicit rank and suit ordering rather than relying on display text.
Both operations must preserve the exact card multiset. Invalid deck construction is an explicit error. Dealing, hands, game rules, scoring, persistence, networking, and user-interface concerns are outside scope.