Hello, this is assignment 3. Attaching PDF file and .zip file.
Will attach the ZIP file after the question is accepted.
Here is a link for the file as well:
https://easyupload.io/r5qlu8
Data Structures I – HW3
Instructions:
1. Download the hw3-files.zip file from the COL submission folder for HW3. As you did for HW1, unzip the
file into the src folder that is in the workspace you created for this class.
2. Start up Eclipse. Use the same workspace that was created when you set up Eclipse. If you do not see
hw3, right-click on the project or the src folder in the explorer window in Eclipse and select refresh.
3. In this assignment, you will be implementing a Board class that keeps track of the state of a game of
Connect 4. An explanation of the game can be found on Wikipedia
(https://en.wikipedia.org/wiki/Connect_Four) and an online version you can try out can be found here:
https://www.cbc.ca/kids/games/all/connect-4. Instead of the colors red and yellow, the players will be
‘X’ (player 1) and ‘O’ (player 2).
4. To get full credit, you must implement all the methods and the constructor in the given java file
Board.java except for the toString method. However, the toString method will be incredibly useful for
debugging and it will be necessary if you want to run the Board class itself. (The main given to you in
Board.java will let you play a game of Connect 4 if you also have toString defined correctly.)
5. See the API comments in the Board.java file for details of how the methods should behave.
6. As usual, you may not change any method names or headers. You may not change the class or file name.
You may not change the package statement at the top of the file and you may not add any import
statements. However, you may add private helper methods if you wish.
7. Unlike other assignments, I have not provided any fields (variables) in the Board class. You are to
determine what fields to use yourself. You may use any fields you wish as long as the type is char, int,
boolean, String, or a 1D or 2D array of one of these types. All fields must be declared private.
8. The BoardTest.java file provided to you is quite long. You will probably need to write your own smaller
tests. You can also try running Board.java. The main provided to you will let you play the game
assuming you have correctly defined all the methods. IMPORTANT: Your grade will be based solely on
BoardTest.java and not on how the Board.java file runs
Submission
Your submission consists of two files. You must submit both files to get full credit.
•
•
Submit your Board.java file
Submit a screenshot of what happens when you run the BoardTest.java Make sure the Junit
window is clearly visible (with which tests passed and which failed) and make sure the Eclipse
window takes up the entire screen when you take the screenshot. Save it to a .png, .jpg, or
.bmp file. Failure to submit a screenshot will result in a 10-point deduction to your grade for
HW3.
Grading
The name of each test function ends in a number indicating how many points that test is worth. Your
score is the sum of the numbers in the names of all tests that pass. Failure to submit a screenshot as
described in the Submission section will result in a 10-point deduction.