Question: iPad.. 7:55 PM Documents 88 O0 Edit Rowley_DIKWHierarchy Program 01 CS 251 Program 01 Due Monday, September 18tlh Main topics: Programmer defined methods Random number


iPad.. 7:55 PM Documents 88 O0 Edit Rowley_DIKWHierarchy Program 01 CS 251 Program 01 Due Monday, September 18tlh Main topics: Programmer defined methods Random number generators Arravs Program Specification: You are to develop a program which emutl deck of playing cards. That is 4 suits (Clubs, Spades Hearts, and Diamonls) and 13 ranks (Ae, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King) n each suit. This of course makes for a total of 52 playing cards in the deck. Mandatory methods: public static void initDeck (boolean[) deck) // set the values of deck to indicate that they are all // present - not dealt yet | public static boolean enptyDeck(boolean [] deck) // returns whether or not all the cards in the deck // have alrcady been dealt public static int dealCard (boolean deck) // returns a card (an int in the range 0 to 51) at randon // that has not been dealt since the deck was initialize // via intDeck. Also notes in deck) that this card is /1 no longer available public static void printCard(int card) // given a card (an int in the range 0 to 51 prints // an appropriate representation of this card based / on a 1-1 and onto mapping of the set to, 51] to // the cards described above Rules and Requirements: Your main method must end with the following block of code, which can not be modified. boolean myDeckne boolean I52] final int cardsPerRou- 8 int cardsThisRou = int ryCard; initDeck (myDeck) System.out.println("nHere is a shuffled deck .. .^n"); while (emptyDeck(nyDeck)) ayCard dea!Card(myDeck) ; =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
