My homework requires me to create a Collection class called DeckofCards which will consist of the deck of cards and all the methods to fill, deal, shuffle, and print the deck of cards. The data object class is still just the card itself. I need to use an Array of Objects defined in the Collection class. My book requests that I create a driver class with a main method that deals each card from a shuffled deck, printing each card as it is dealt. The Card class will need to be adjusted so that when the cards are printed, they show as "Ace of Spades", not 1 of 4. After each card is printed, also print the number of cards left in the deck at that time. The driver class will invoke the methods in DeckofCards. I need to create (instantiate) the deck within the driver class, and then "fill", "shuffle", and "print" the deck..all from the driver class. However, the methods to do this will be in the Collection class. The constructor of the DeckofCards will create an array of 52 objects?
2007-02-06
06:46:09
·
2 answers
·
asked by
BriGuy
2
in
Games & Recreation
➔ Card Games