The document describes the creation of a method called makeDeck that generates a fully populated array of Card objects. It includes the definition of a Card class with attributes for rank and suit, along with methods to retrieve these attributes and a toString method for representation. The makeDeck method initializes an array of 52 cards by iterating through suits and ranks to populate the deck accordingly.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
Lab 7
The document describes the creation of a method called makeDeck that generates a fully populated array of Card objects. It includes the definition of a Card class with attributes for rank and suit, along with methods to retrieve these attributes and a toString method for representation. The makeDeck method initializes an array of 52 cards by iterating through suits and ranks to populate the deck accordingly.