Hi All,
I've decided to go over some old code I wrote to make it a lot more OO friendly but am having trouble with two classes in particular which are extremely similar but also quite different:
The problem I have is that PlayingDeck is the standard deck we all know and love when playing card games such as Poker etc. ShreddedDeck is a deck which will be populated with
cards which have been discarded from the PlayingDeck. That is why the implementation of the addCard() and removeCard() is different, the constructor is also different between these classes. Nevertheless, these classes are quite similar so should I add/is there scope for say an interface or an abstract class somewhere?
I was thinking about a Deck Interface with the methods add(), remove(), size() but decks are also shuffled but the shreddedDeck() should never be shuffled.
Any advice/input would be welcome.