Starting from:

$30

EECS1022-Lab Programming Test 2 Solved

1.1        Step 2: Programming Tasks
From the Package Explorer of Eclipse, your imported project has the following structure.

•   Your submission will only be graded by:

–    JUnit tests given to you in TestUtilities.java

–    additional JUnit tests on input values not covered in TestUtilities

•   You may manually test the assigned methods using the App console application class given to you in consoleapps. Declaration of the main method and a scanner are completed for you.

•   Your goal is to pass all JUnit tests given to you (i.e., a green bar). To run them, as shown in the Java tutorials on Week 1, right click on TestUtilities.java and run it as JUnit tests. Of course, none of the given tests would pass to begin with.

You must not modify the JUnit test methods given to you.

However, you are allowed to add new JUnit test methods to test your code.

 

How to Deal with a Failed JUnit Test? From the JUnit panel from Eclipse, click on the failed test, then double click on the first line underneath Failure Trace, then you can see the expected value versus the return value from your utility method. For example:

More products