At 23.59 on the day that your class has agreed with the TA.
Any late hand-in must be agreed with your TA; failing to do so will allow the TA to reject evaluating your hand-in.
High
The learning goals are Private Interfaces, Test Spy and again the compositional design principles.
Carefully read FRS § 37.5 which outlines the Interface-Segregation-Principle and private/role interface refactoring, and the new EtaStone and SemiStone (and optionally ThetaStone) variants. FRS 2nd Edition §15.8 and §15.9 provides the theory you need.
Refactor your HotStone code base to adhere to the Program to an Interface principle by introducing appropriately named private interfaces to handle mutation of internal game state.
Document your design as outlined in the report template.
FRS 2nd Edition §15.8 provides the theory you need, and, as a supplement, I have written this cheatsheet for private interface.
Note that this exercise strongly requires you to have developed a private interface for Game, as outlined in the previous exercise, to be solved correctly!
Develop EtaStone using TDD by refactoring the existing HotStone production code, and using a Test Spy to ensure card effects are Unit Tested, and not Integration Tested.
Document your card effect testing and argue for unit testing as outlined in the report template.
Develop the SemiStone variant: The combination of all your most playable HotStone variants. Including ThetaStone, below, is of course optional.
Document your design as outlined in the report template.
Consider the situation that you have designed all variants using a purely parametric design . That is, all variable behaviors are controlled by if's and switches in a single large implementation of Game containing code for all the requirements.
Sketch how method 'getWinner()' would look like this if a purely parametric design had been employed as variant handling technique in the HotStone code.
Consider the situation that you have designed all variants using a purely polymorphic design. That is, a design in which variants are created by subclassing the original AlphaStone implementation, like shown below:
For instance, the BetaStone winning algorithm would be handled by overriding the getWinner() method in class AlphaStone, etc.
Develop ThetaStone using TDD and by generalizing/extending your HotStone production code. Be sure to use a role interface for Categories.
This is purely an optional exercise, for 'fun' and improved game play.
Deliveries:
Your submission is evaluated against the learning goals and adherence to the submission guidelines. The grading is explained in Grading Guidelines. The TAs will use the Iteration 6 Grade sheet to evaluate your submission.
| Learning Goal | Assessment parameters |
| Submission | Git repository contains an "iteration6" branch that is merged into main/master branch. Git repository is not public! Required artifacts (report following the template) are present. |
| Private Interfaces | The report clearly and concisely describes a refactored design of Card, Hero, and Game using private interfaces. Casting to concrete classes/declaring datastructures by concrete classes have (largely) been removed. The code base and code examples correctly reflect introducing private interfaces. |
| EtaStone Design | The EtaStone's card effects are designed and coded using a compositional/3-1-2 approach. The design uses role/private interface(s). The design is clearly and correctly documented in the report. |
| Unit Testing via Test Spy | The card effects of EtaStone is TDD/tested by unit testing and a test spy. |
| SemiStone | The report clearly and concisely describes the SemiStone configuration table and configuration code. The compositional design principles are correctly applied in the code base to support all variants and in particular support the multi-variance SemiStone. There are no source-code-copy, parametric, or polymorphic based variant handling code. The 'variant to use' code is localized in the ConcreteFactory for each variant. |
| Parametric Analysis | The report clearly and concisely presents a correct solutions to the parametric 'getWinner()' through correct (pseudo) code fragments. |
| TDD and Clean Code | TDD process has been applied. Test code and Production code keeps obeying the criteria set forth in the previous iterations, including adhering to Clean Code properties for newly developed code. Missing features are noted in the backlog (ThetaStone features allowed there (permanently)). |