Starting from:

$30

CS2110-Homework 2 Solved

1.   Make sure all 4 files are in the same folder:

(a)    Bases.java

(b)   Operations.java

(c)    BitVector.java

(d)   hw2checker.jar

2.   Open a terminal / command prompt and navigate to the folder that all the files are in.

3.   Run the following command to see your grade for BitVector.java:

java -jar hw2checker.jar -g BitVector.java

4.   It should show all the test cases you are failing and give a 0/45 score.

5.   Implement one of the functions in BitVector.java and re-run step 3 until you get full credit for that part of BitVector.java.

Now complete all the other methods in each of the 3 files based on their comments. Run the verifier and autograder frequently to avoid errors and to make sure you are using only the allowed operations.

Note: We have included an Examples.java file which shows and explains examples of two methods similar to those used in your assignment, which may be useful if you get stuck or confused at any point.

1         How to run the auto-grader & verifier
1.   Make sure that the hw2checker.jar file is in the same folder as your Bases.java, BitVector.java, and Operations.java files.

2.   Navigate to this folder in your command line.

3.   Run the desired command (see below).

1.1        Commands
Test all methods and verify that no banned operations are being used (all 3 files):

java -jar hw2checker.jar

On Windows and Mac, you can also double click the hw2checker.jar in your file explorer to test and verify all 3 files. The results will be placed in a new file called gradeLog.txt. Any errors with compilation, infinite loops, or other runtime errors will be placed in a new file called errorLog.txt.

Test & verify all methods in a single file (using Bases.java). Useful for when you just want to look at one file at a time. For example:

java -jar hw2checker.jar -g Bases.java

Test all methods in a single file without running verifier (using Bases.java). This means that this will only run the unit tests, and will not check for the use of banned operations. Useful for when you just want to try and get something that works. For example:

java -jar hw2checker.jar -t Bases.java

Verify all methods in a single file without running tests (using Bases.java for example):

java -jar hw2checker.jar -v Bases.java

More products