Earlier quoted context omitted.
Sounds silly, it’s a shame you didn’t get past the initial screen. It’s a process that has to be humored and you could have added a lot of value just by joining and then patching their hiring process. When I was teaching in high school the deck-modelling thing is one that the kids come up with a lot especially when it came to doing their term project. I love the idea of being asked to implement a deck of cards using…
Yeah I'd model it as something like this maybe? public enum Color { RED, BLACK } public enum Suit { Diamonds(RED, '♦'), Hearts(RED, '♥'), Clubs(BLACK, '♣'), Spades(BLACK, '♠'); Color color; char symbol; public Suit(Color color, char symbol) { this.color = color; this.symbol = symbol; } } public enum Rank { Ace('A'), Two('2'), //... } public record Card(Suit suit, Rank rank) { // ... } The question is fundamentally br…
Thanks!