Question: Class MyDeck: Property of MyDeck: -cardList ArrayList Additional constructor of MyDeck: Define a constructor which accepts a LFSR as parameter and produces a deck (list

Class MyDeck: Property of MyDeck: -cardList ArrayList Additional constructor of MyDeck: Define a constructor which accepts a LFSR as parameter and produces a deck (list of objects Cards) as follows: creates a card using the register [see Card constructors] if the card is not in MyDeck, add the card at the end of the list of cards and update the register, else stop. Methods of MyDeck: +void shuffle() {} The method corresponds to the "Pile shuffle" (see https://en.wikipedia.org/wiki/Shuffling ). The method produces a random index n, with 0 distributeCards () {} Define a method which creates a list of cards containing the first 5 cards of the deck.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!