Yikes. Let me see if I can give you a hint. Say you have a card Object:
public class Card{
Suit suit;
Face value;
public Card(Suit suit, Face value){
this.suit = suit;
...
Type: Posts; User: KevinWorkman
Yikes. Let me see if I can give you a hint. Say you have a card Object:
public class Card{
Suit suit;
Face value;
public Card(Suit suit, Face value){
this.suit = suit;
...
Well yeah, you'd store the Card Objects in an array or a List or something. It's at creation time that the enums come in handy- you'd just need a nested for loop instead of 52 initializations.
Instead of having 52 different enum constants, you could have two different enum types: one for suit, one for number. Then have a Card Object that contains an enum constant from each enum type.