NorimasaNabeta / GraphicalSet

Stanford CS193p 2013 Winter HomeWork3
0 stars 0 forks source link

RT2 polymorphism #2

Open NorimasaNabeta opened 11 years ago

NorimasaNabeta commented 11 years ago

You must use polymorphism to design your Controllers for the two games (i.e. you must have a (probably abstract) base card game Controller class and your Set game and Playing Card game Controllers must be subclasses thereof).

NorimasaNabeta commented 11 years ago

HINT1. If you used inheritance to design your Controllers last week, the polymorphism part of the assignment will be a breeze. If you did not, then this is a skill you must master. Hopefully your OOP skills are such that you know what polymorphism is, but suffice it to say, you must have a base Controller class which encapsulates as much as possible that is conceptually in common between the Set game and the Playing Card game and this base class must have public API for the subclasses to override to provide game-specific behavior. Each of the two tabs in your application will have a Controller which is a (different) subclass of this shared base Controller class.

NorimasaNabeta commented 11 years ago

HINT3. You will need to enhance your CardMatchingGame, but not that much ...