CSC 217 Lab 00: Installation
For Lab 00 you will set up your development environment for CSC 217.
Learning Outcomes
- Set up a development environment for CSC 216/217
Development Environment Installation
For Lab 0, you will have the opportunity to set up your development environment. Go through the Eclipse Install Tutorial. If you have any questions, please come to office hours or post to Piazza!
After setting up your development environment, you will demo your setup for the teaching staff as outlined below. Please go through the demo steps BEFORE checking in with the teaching staff or recording the video for grading.
There are several options for how you can receive credit for your Lab 00 demo:
- Attend office hours of any CSC 216/7 PTF or instructor and run through the demo outlined below. They will grade your demo and if there are missing items they will let you know and you can revise (independently) for another review.
- Record a video of your demo and submit to Moodle for a review by the Lab 00 deadline. We encourage you to use Open Broadcaster Software to record your demo. Submit on the lab CSC 217 Moodle.
Submissions to GitHub without an associated office hour or video demo will be graded for partial credit; however, there are parts of the Lab 00 expectations that we cannot see on GitHub alone.
Lab 00 is due by January 28th at 11:45pm.
Demo Step 1: Launch Eclipse
Launch Eclipse and show that all plug-ins are installed. You can see the icons for installed plug-ins by selecting Help > About Eclipse IDE. The icons of the required plug-ins are highlighted in red and may appear in a different order than the screenshot.
Demo: Eclipse is open
Demo Step 2: Import Demo Project
To ensure that all of the plug-ins are configured correctly, download the Demo Eclipse Project. Import the project into your workspace:
- Right click in the Package Explorer and select Import > General > Existing Projects into Workspace. Click Next.
- Select the radio button Select archive file and Browse for
demo.zip
. - Make sure that
DemoProject
is selected in the Projects text area and click Finish. DemoProject
should now be listed in the Package Explorer.
Wait a bit for the project to build. If your project has a big red exclamation point icon over the project folder your project was unable to build due to a path issue within Eclipse. To fix, do the following:
- Right click on the project and select Properties > Java Build Path > Libraries tab.
- Select the JRE System Library (which will be labeled unbound) and click Remove.
- Select Modulepath.
- Click Add Library….
- Select JRE System Library. Click Next.
- Select the radio button for Workspace default JRE (jdk 11 name). Click Finish. Note that the JRE 11 name will vary depending on the name of your local default JDK/JRE. If your default JRE is not version 11, go back to the Java in Eclipse section of the Install Tutorial.
Demo: Open the DemoProject and ensure that the JRE System Library is listed as [jdk-11.0.3]
or some other version of Java 11.
Demo Step 3: Run CheckStyle
CheckStyle needs to be turned on for each project so that it will run with every build. To activate CheckStyle for a project, do the following:
- Right click on the project and select Properties > Checkstyle.
- Click the check box next to Checkstyle active for this project. Ensure that the CSC 216/217 configuration is selected.
- Click Apply and Close.
After running CheckStyle you should see 5 notifications in the Problems view. If you see more than this, you didn’t configure CheckStyle properly.
Demo: Appropriate notifications are displayed.
Demo Step 4: Run SpotBugs
SpotBugs needs to be turned on for each project so that it will run with every build. To activate SpotBugs for a project, do the following:
- Right click on the project and select Properties > SpotBugs.
- Click the check box next to Run automatically.
- Click Apply and Close.
After running SpotBugs you should see 1 notification in the Problems view of type SpotBugs Problem. If you see more than this, you didn’t configure SpotBugs properly.
Demo: Appropriate notifications are displayed.
Demo Step 5: Run PMD
PMD needs to be turned on for each project so that it will run with every build. To activate PMD for a project, do the following:
- Right click on the project and select Properties > PMD.
- Click the check box next to Enable PMD.
- Click Apply and Close.
To see PMD notifications, you need to add the PMD Violations Overview view to your Java Perspective by selecting Windows/Eclipse > Other > PMD > Violations Overview. There should be 9 PMD notifications across the src/
and test/
folders. If you see more than this, you didn’t configure PMD properly.
Demo: Appropriate notifications are displayed.
Demo Step 6: Run Unit Tests for Coverage
We will run automated unit tests on our code this semester and assess the quality of tests through code coverage. To run unit tests instrumented for coverage, do the following:
- Open the project. Right click on the
test/
folder and select Coverage As > JUnit Test. - The tests will run and results will show with a red bar. X out of Y tests are failing.
- A coverage report will show. In the upper right menu, select the white triangle pointing down and click on Line counters. You’ll see 58% line coverage for the
Grades
class; 0% line coverage forGradesUI
class; and 94.8% line coverage forGradesTest
class.
Demo: Appropriate test results and coverage are displayed.
Demo Step 7: Git Configuration in Eclipse
Ensure that you have configured Git in Eclipse with your name and NCSU email address. You can demonstrate the configuration by:
- Select
- Windows users: Window > Preferences > Team > Git > Configuration.
- Mac users: Eclipse > Preferences > Team > Git > Configuration.
- Open up the user label to show name and email address. You MUST use your NCSU email address.
Demo: Your name and NCSU email address are displayed.
Demo Step 8: Push Demo Project to GitHub
You have been assigned a GitHub repository for Lab 00. Push your DemoProject to GitHub. See slides 26-29, the Git Tutorial, or the Git instructions from Guided Project 1.
When you’re done, check on NCSU’s GitHub website that the DemoProject
folder is listed.
Demo Step 9 [optional + extra credit]: Git Configuration on Command Line
If you have installed Git for your operating system and configured your global user name and email settings, show the PTF via the following command from your favorite command line tool:
$ git config --list
Your name and NCSU email address should be listed under user.name
and user.email
:
...
user.name=Sarah Heckman
user.email=sarah_heckman@ncsu.edu
...
Demo: Your name and NCSU email address are displayed.
Lab Deadlines
For Lab 0, you are expected to:
- demonstrate that you have successfully set up your personal development environment either to a PTF/instructor or through a demo video submitted to the CSC 217 Moodle.
Lab 00 is due by January 28th at 11:45pm.
Lab Rubric
You will be evaluated on demonstration that you have successfully set up your personal development environment.
Grading Rubric
Development Environment Setup Rubric
Phase | Grade Item | Points | Details |
---|---|---|---|
CheckStyle Notifications | 10 | Correct CheckStyle notifications are displayed demonstrating installation of plug-in and configuration file. | |
SpotBugs Notifications | 10 | Correct SpotBugs notifications are displayed demonstrating installation of plug-in and configuration file. | |
PMD Notifications | 10 | Correct PMD notifications are displayed demonstrating installation of plug-in and configuration file. | |
Java 11 | 15 | Java 11 is the default JDK in Eclipse | |
Coverage Report | 10 | Correct coverage when running unit tests. | |
Eclipse Git Configuration | 15 | User name and email are set in Eclipse's eGit settings. This can also be assessed via the user name that shows up in GitHub. | |
DemoProject Committed to GitHub | 15 | DemoProject committed to GitHub in the correct folder structure. | |
Extra Credit - Command Line Git Configuration | 5 | Command line Git user name and email are set up | |
Total Points | 90 |