Homework 3
Implementation & testing
You may work with others on this assignment. Each programming pair, however, must submit their own
codebase, clearly specifying the collaborators. The codebase should be written in the pair’s own words.
A programming pair may contain 1, 2, or 3 students. This allows the usual groups of 3 to remain together.
You should submit on Gradescope. Late assignments will be accepted with prior permission or for
extenuating circumstances. Due: Monday April 17, 2023, 11:59 PM
There are a total of 100 points.
Overview
The goal of this assignment is to design, implement, and test a Tic Tac Toe app, to improve adherence to
non-functional requirements (e.g., understandability, modularity, extensibility, testability), design princi-
ples/patterns, and best practices.
This implementation applies the MVC architecture pattern. In contrast to the current version, your
implementation should support possible extensions aiming to satisfy the open/closed principle (specifi-
cally information hiding with encapsulation). Additionally, your implementation should enable individual
components to be tested in isolation.
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 for the 3 sections below), and use descriptive log messages.
How to get started
1. Clone the third version of the repository https://github.com/LASER-UMASS/CS520.git containing the
tictactoe folder with ”git clone https://github.com/LASER-UMASS/CS520.git -b v1.1.0” (This is our
hw2 solution.)
NOTE) Alternatively, you may build on your hw2 solution.
2. Read the provided README in the tictactoe folder.
3. Use the commands to document, compile, test, and run the application from that folder.
4. Familiarize yourself with the original application source code contained in the src and test folders:
src/RowGameApp.java
src/controller/RowGameController.java
src/view/GameBoardView.java.java
src/view/GameStatusView.java
src/view/RowGameGUI.java
CS 520 Spring 2023 . Homework 3. Implementation & testing Page 1 of 3
src/view/View.java
src/model/RowGameBlock.java
src/model/RowGameModel.java
test/TestExample.java
Your version of the application must adhere to:
the MVC architecture pattern
Design principles and patterns
Best programming practices
Usability: Undo functionality [Approximately 1/4 of the 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 needs to apply good UI design, the MVC architecture pattern, and the
Composite design pattern.
This design needs to be implemented and tested (see below).
Testability: Unit test suite(s) [Approximately 1/2 of the points]
You should regression test to make sure that the existing 2 test cases still pass. Additionally, you should add
seven (7) new test cases:
1. After performing an illegal move, the game is not updated.
2. After performing a legal move, the game is updated appropriately.
3. One of the players wins the game.
4. The players tie the game.
5. After resetting the app, the game has the expected initial configuration.
6. If the user has not done at least one move, the user is not permitted to undo.
7. If the user has done at least one move, the user is permitted to undo and the game is updated appropri-
ately.
Each of the new test cases needs to apply the test case template from the test driven development lecture.
For minimal test adequacy, you need to have at least one test case to cover each of the model, view, and
controller.
CS 520 Spring 2023 . Homework 3. Implementation & testing Page 2 of 3
Understandability: Documentation [Approximately 1/8 of the points]
You should update the README file to document any new functionality.
You should generate the javadoc (contained in the jdoc folder) and commit it.
You should have incremental commits about your modifications.
Deliverables [Approximately 1/8 of the points]
Your submission, via Gradescope, must be a single archive (.zip or .tar.gz) file named hw3, containing:
1. The tictactoe 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, not a single version of the code. 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.
CS 520 Spring 2023 . Homework 3. Implementation & testing Page 3 of 3
WX:codehelp
标签:src,java,Implementation,testing,should,test,design,CS,your From: https://www.cnblogs.com/somtimes/p/17349050.html