Skip to content

Starter project configuration for my COMP 303 Software Development course at McGill University

License

Notifications You must be signed in to change notification settings

prmr/COMP303Starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMP303 Starter Project

Starter project configuration for the course COMP 303: Software Design at McGill University

This repository is configured to be seamlessly imported into the latest version of the Eclipse IDE. However, if you know what you are doing, you can import the project into the IDE of your choice and find the corresponding tools.

To set yourself up:

  1. Make sure you have Eclipse for Java (or your favorite Java IDE) and Java 17 or higher.
  2. Install JavaFX and create a library for it in Eclipse by following these instructions
  3. Make sure you call your library JavaFX to match the build configuration on the repository.
  4. If on a Mac, when you run the application, from the run configuration, make sure the checkbox "Use the -XstartOnFirstThread argument when launching with SWT" is not checked.
  5. Install the Checkstyle Eclipse Plug-in. In Eclipse, select Help | Eclipse Marketplace... and enter Checkstyle in the Find: box. From the results, install Checkstyle Plug-In....
  6. Clone this GitHub repository into your Eclipse workspace. In the Eclipse package explorer, right-click and select Import... | Git -> Projects from Git | Clone URI and under URI enter https://github.com/prmr/COMP303Starter, then click-through, requesting to import existing Eclipse projects. Once imported, the project should compile without errors.
  7. While you're at it, clone the JetUML project into your Eclipse workspace. For convenience, you can also install it.
  8. Similarly, clone the Minesweeper and Solitaire projects into your Eclipse workspace.

If you do get a build error, make sure you have the correct version of Java installed, and issue the command Project | Clean... | Clean all projects. This will force the code to recompile and solve most problems due to out of date or improperly synched files, which sometimes happens.

To ensure that everything works and start experimenting:

  1. In package demo, right-click on the file Welcome.java and select Run As... | Java Application. You should see a small GUI application appear. Try the different buttons which should do trigger some interaction from the user interface.
  2. Right-click on the file TestAlternatingLabelProvider.java and select Run As... | JUnit Test. A green bar should appear.
  3. Right-click again on the file TestAlternatingLabelProvider.java and select Coverage As... | JUnit Test. A green bar should appear, along with a view showing coverage information. If you go back to the source code file, most lines should be highlighted in green. The meaning of this will be explained later in the term.
  4. Access the "Problems" view in Eclipse. You should see at lest two warnings of the type "Checkstyle Problem". If you do not, right-click on your project and select Checkstyle | Activate Checkstyle.

Once everything works as described above, try the following:

  1. Fix the code to make the Checkstyle warnings go away. To see the full list of coding rules checked by the tool, right-click on the project and select Properties | Checkstyle | Configure and play around with the viewer.
  2. Change line 37 of file AlternatingLabelProvider.java to return aLabel1 instead of aLabel2, and re-run the test. The test should fail.
  3. Learn some seriously useful shortcuts. My personal favorites are: CTRL-1, CTRL-SHIFT-R, CTRL-SPACE, CTRL-O, ALT-SHIFT-R.

Creative Commons License

Unless otherwise noted, the content of this repository is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Copyright Martin P. Robillard 2022

About

Starter project configuration for my COMP 303 Software Development course at McGill University

Resources

License

Stars

Watchers

Forks

Packages

No packages published