CompSci 307
Fall 2021
Software Design and Implementation

Design Exercise: Changing Features Helps Clarify the Design

This exercise is intended for you to update your Object-Oriented design based on feedback from your mentor TA and based on additional game features. The world changes constantly, and software needs to change as well to stay useful, and good design should support making it easy to incorporate new features. This exercise will not be explicitly graded but, instead, serve as practice for future exercises in the course. Thus, you will get the most out of this assignment by putting in a good faith effort.

Submission

Submit a Markdown formatted plain text file, named design03_fluxx_variant.md, to the individual portfolio_NETID repository provided for you in the course's Gitlab group.

Specification

Consider a variant on Fluxx called Zombie Fluxx.  In particular, there are two new card types: Creeper and an Ungoal

Here are the differences in Zombie Fluxx from the original:

Here is the complete list of cards in Zombie Fluxx. The following examples highlight some new features to consider as you update your design:

Add four new Use Cases to test your updated design based on the any of the cards above.

Update your design, the objects with their behaviors and relationships, and the Use Cases that test it to also support multiple versions of the game. Additionally, note the following as you make your changes:

Abstraction

Try not to get too invested in how to implement the specific details given above because the larger goal to keep in mind is that Fluxx has dozens of versions, each with their own set of changes and details. Instead, use the details to help you make a design that builds on the parts of your classes that are common and provides support for the parts that are different to support both versions of the game. The key is to focus on active abstractions, i.e., superclasses, in your project that can have multiple concrete implementations, i.e., subclasses but specifically only on their behavior, i.e., methods, rather than state, i.e., instance variables. If done well, most of your code will be written using the abstractions without needing to know about specific implementation details because they are substitutable.

That is why it is important for you to keep track of what will change about your design in order to handle playing Zombie Fluxx (or any variation). The hallmark of the Open-Closed Principle is to ensure the changes you need to make involve making new classes, not changing existing code/logic.  The Single Responsibility Principle supports this by encouraging you to make the pieces of your design (classes and methods) small and focused enough that they can be usefully substituted. These principles make your design is more robust against changes (and easier to debug!)