You are on page 1of 9
‘Overview and goal ‘The goal of this assignment is to redesign and reimplement a Tic Tac Toe app, to improve adherence to non-functional requirements (¢.g., understandability, modularity, extensibility, testability), design princi- plepatterns (e.g. open-closed principle, Composite design pattern), and best practices. This implementation applies the MVC architecture pattern. In contrast to the current version, your plementation should support possible extensions aiming to satisfy the open/closed principle (specifically information hiding with encapsulation). Additionally, your implementation should enable individual com- ponents to be tested in isolation. The implementation satisfies some best practices but violates other best practices. ‘You are expected to clone the existing repository and keep your implementation under version control using the cloned repository. You will submit your repository to us, so you should make coherent and atomic commits (in particular at least for the first 3 sections below). and use descriptive log messages. Read the provided README in the tictactoe folder. Use the commands to document, compile. test, and run the application from that folder. Familiarize yourself with the original application source code contained in the sre and fest folders: + src/RowGameApp.java + sc/controller/RowGameControllerjava + src/view/RowGameGUI java + src/model/RowGameBlock java + src/model/RowGameModel java + test/TestExample.java Your app gdhere tn: * the MVC architecture pattern + GO design principles and patterns « Best programming practices Understandability: Documentation [Approximately 10 points} ‘You should update the documentation including: 1. You should generate the javadoc (contained in the jdoc folder) and commit it 2. You should have incremental commit messages. Modularity: Open-closed principle [Approximately 20 points] ‘This version of the application has started to apply the MVC architecture pattern. The RowGameModel class contains the dala representation of the Tic Tac Toe game. This class has started to apply the open-closed principle. The class should further apply the open-closed principle. Specifically, the RowGameModel class should provide information hiding with encapsulation for the player field, Additionally, this class should provide input validation (to support type safety) for the player field. Some possible ways to support type safety are defensive programming, constants, and enumerated types. All of the above needs to be implemented. Extensibility: Composite design pattern [Approximately 40 points] ‘This version of the Basic Stats app separates the Model (BasicStatsModel), the View (BasicStatsGUI), and the Controller (BaxicStatsController). ‘Competent A ee | Component ¢ [SF mays? Figure 1: Main components of the “Tic Tac Toe* UT ‘The Composite design pattem will further separate the base Views (Component A, Component C) from the composite View (BasicStatsGUL). For the Composite design pattern, here is the Component class. package view; public interface View [ public void update (RowGameModel model); } ‘You need to implement all of the concrete classes that implement the View interface (including Component A, Component €, RowGameGUl). For the Compasite design pattem, the RowGameGUlI class needs to be reimplemented to be the Composite class. Based on your manual reviews, two bugs were reported: + In Component A, one known bug is that one player (e.g., I) can overwrite the other player's move (e.g. 2d. + In Component D, another known bug is thai the game status (Component C) is editable. ‘You should perform another manual review to localize the cause of these bugs and implement fixes for them, All of the above needs ta be implemented Usability: Undo functionality [Approximately 20 points] In the User Interfaces lecture, we discussed that one good UI design principle is to provide undo functionality. Here is the informal specification for the undo functionality: * If the two players have done one or more moves (and have not undone them). a player should be allowed to undo the previous move done. * If there are no more moves to be undone, the undo functionality should be disallowed. ‘The undo functionality design should apply the MVC architecture pattern The undo functionality design does not need to be implemented. 1. The rictactoe folder with all the updated source files and test cases of your application. The git log needs to be submitted as either a text or PDF file. The git log should have a set of coherent commits showing your work, nota single version of the cade. Because Gradescope has issues with very large folders containing many files, you should NOT include the .git folder in your submission. We will be checking the following: 1. The git log (either text or PDF file) is included and has incremental commit messages 2. ‘The app compiles and runs 3. The test suite compiles, runs, and all test cases pass

You might also like