To wrap up the introductory Ruby lessons, let's create a deck of cards using Object Oriented Programming. This is a common interview question that tests the applicants knowledge about object oriented programming. This one is quite challenging. Good luck!
We should be able to deal the deck
Card
class and a Deck
classinitialize
method for the Deck
class, build all 52 cards and store it in an instance variable arrayshuffle
method for your Deck
classdeal
method for your Deck
classRemember, this challenge is supposed to be difficult! Don't hesitate to reach out to the community for help!