To work on a new assignment in Eclipse you will need to create a new project, add the necessary class files, test your solution, then create a jar file and submit.

WARNING: This should only be done after your planning document has been completed. Do not start programming without a plan.

To create a new project in Eclipse:

1. Under “file”, hit “New” 2. Hit “Project”, then select “Java Project” and hit Next 3. Enter a project name. Avoid spaces as this will create a new directory. 4. Hit “Finish”

To add a new class: 1. Click on the project in the “package explorer” window 2. Under “file”, hit “New”, then “Class” 3. Ensure that the source folder is correct for your project and package is left blank 4. Enter the name of the new class and click “Finish” 5. Enter your code.

To test your project: 1. Make sure the class containing the main method is selected in the editor window 2. Under “Run”, select “Run As”, then “Java Application” 3. Your project will build and run 4. Once you’ve fully tested your assignment, create a .jar file and submit

To debug your project: 1. In the margin at the far left of the editing window, double click to set a breakpoint 2. Breakpoints can be removed by double clicking again 3. Breakpoint properties can be modified by right clicking on a breakpoint 4. Once all breakpoints are set, click “Run”, select “Debug As”, then “Java Application” 5. If asked to change to a “Debug Perspective”, hit “Yes” 6. Use the debug buttons to step through your code

To create a .jar file: 1. Under “file”, hit “Export” 2. hit “JAR File”, then Next 3. Double click on the project name in the “resources to export” window 4. Check that project name. This should also check the boxes in the window on the right- hand side. 5. In the box labeled “Jar File: “, type the name of the file with a .jar extension (e.g. minor2.jar) 6. Keep hitting next until you see a box labeled “Main Class” at the bottom. Browse for the class containing the main method. 7. Hit finish 8. Find and test your jar file (click on it and see that it runs)

To submit your project: 1. In Moodle, click on the assignment 2. Browse for the files to submit and click the “Upload this file” button 3. Repeat to submit all files required (typically .doc, .jar, and .java files) 4. Check back later for grades/response files