Reminders of Some Java Syntax
- To compare primitive values (e.g., int, double, char, ), use the == relational operator.
- To compare the contents of two strings s1 and s2, write equals(s2).
1 Getting Ready for Submission
You are required to submit a Java project archive file (.zip) consisting all subfolders.
- Before you submit, you must make sure that the Problems panel on your Eclipse shows no errors (warnings are acceptable). In case you do not see the Problems panel: click on Window, then Show
Submitting programs with errors (meaning that it cannot be run for grading) will result in possible partial, but low, marks.
2 Submission
- Check the top-level Test2b
Make sure that all subfolders are checked: .settings, bin, and src.
Under To archive file: browse to, e.g., desktop, and save it as Test2b.zip (case-sensitive) Then Finish. (diagram below is just for example; name should be Test2b.zip)
- Go to the eClass site for Sections M,N,O: https://eclass.yorku.ca/eclass/course/view.php? id=6214
- Attach the Java archive file: zip
- You may upload as many draft versions as you like before the deadline.
- You must explicitly submit the draft version for grading before the deadline.
- Once you click on the submit button, you can no longer upload another draft version.
3 Getting Started
3.1 Step 1: Download and Import the Starter Project
- Download the Eclipse Java project archive file from eClass: zip
- 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 Test2b box is checked under Projects.
Then Finish. (diagram below is just for example; name should be Test2b.zip)
3.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 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 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:
4 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.

![[Solved] EECS1022 Test 2](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] EECS1022 Lab1-Elementary Programming (with no conditionals or loops)](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.