Starting from:

$30

EECS1022-Programming Test 1 Solved

1.1        Step 1: Download and Import the Starter Project
1.   Download the Eclipse Java project archive file from eClass: Test1c.zip

2.   Launch Eclipse and browse to EECS1022-W21-workspace as the Workspace then click on Launch, e.g.,

 

 

3.3 Choose Select archive file. Make sure that the Test1c box is checked under Projects.

Then Finish. (diagram below is just for example; name should be Test1c.zip)

 

1.2        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:

 

2         Your Tasks
•   See the comments written in the Utiliites class to see each of the assigned methods to complete.

•   See test methods in the TestUtilities class for examples. You may add additional test methods if you wish.

More products