Before continuing on, make sure you’re caught up on the lectures through 5/22 and completed EX03.
In your ex03 package, right click and create a new java class called ComplexNumberTests
. This is the file where you will write your test suite. Please write 2 Unit Tests for each one of methods from EX03, excluding the constructor. So, this should be 12 methods in total.
You will make use of the assertEquals
and method we saw in class to check if the results of your methods match what is expected. Additionally, when checking for boolean conditions (i.e. with the ComplexNumberImpl
equals
method), you should use the assertTrue
or assertFalse
methods provided by the JUnit Library. For example,
Example e = new Example();
boolean b = e.is_alive();
assertTrue(b);
“Push” your work up to GitHub for backup. By creating “commits”, which you can think of as versioned checkpoints in your workspace, you are not at risk of losing your work. It’s easy to revert back to an old version or to restore your entire workspace on a different computer.
main
branch, and needs to be pushed to your remote backup.USERNAME
with your GitHub username:
https://github.com/comp210-ss1-24/summer210-workspace-USERNAME
All that’s left now is to hand-in your work on Gradescope for grading! IMPORTANT This assignment will be manually graded.
Before doing so, you need to know that before an assignment’s deadline you can resubmit work as many times as you need to without penalty. Portions of assignments are autograded and will provide near-immediate feedback. We want you to resubmit as many times as it takes you in order to earn full autograding credit!
Login to Gradescope and select the assignment named “EX04 - Unit Tests” You’ll see an area to upload a zip file. To produce a zip file for autograding, return back to IntelliJ.
Along the bottom of your window, you should see an option to open a terminal integrated into IntelliJ.
Type the following command (all on a single line):
./submit.sh ex03
In the file explorer pane, look to find the zip file named “ex03_submission.zip”. The script will call it an ex03 submission since that is the package we zipped. If you right click on this file “Open in -> Finder” on Mac, the zip file’s location on your computer will open. Upload this file to Gradescope to submit your work for this exercise.
We are working on rewriting the script to work for Windows! Until then, please navigate to your course workspace in a File Explorer window. Then right click on the src
folder in your exercises directory and compress the directory into a zip folder. You can name it “ex04_submission.zip”
When you upload it to Gradescope, please delete any files that showed up in the src/
folder that were not actually part of ex03
. You should include the ComplexNumber
Interface, ComplexNumberImpl
Class, and ComplexNumberTests
in your zip.