This paper presents an object--oriented design for a solitaire version of the game of Set? The design is responsibility driven and illustrates polymorphism and several fundamental design patterns, including Flyweight, Strategy and Factory. It introduces each of these to solve particular problems within the design. The direct application of these concepts and the interest our students show in the game make Set an ideal example for classroom discussions and assignments.
展开▼