Originally posted by Bill Stanard:
Good question, Junilu. Less than satisfactory answer: I want to create a card game project for a group of students, so I want to break out a series of methods into separate classes (card, deck, shuffle, deal, discard, draw, score, et cetera).[ December 05, 2005: Message edited by: Bill Stanard ]
Bill, some of the things in the list don't logically qualify as classes, e.g. shuffle, deal, discard, draw. Notice that these are all verbs. The nouns are better candidates for classes, e.g. card, deck, score.
Some candidate classes might be: Card, Deck, Game, Dealer, Player, Hand, Shuffler.
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|