Lab: Skills - Using Gradescope
Instructions:
Answer the following questions one at a time. After answering each question,
check your answer (by clicking on the check-mark icon if it is available)
before proceeding to the next question.
Getting Ready:
Before going any further, you should:
-
Setup your development environment.
-
Depending on your development environment, create either a
directory or a project for this lab.
-
Download the following files:
to an appropriate directory/folder (e.g., the
course downloads
directory/folder). In most browsers/OSs, the
easiest way to do this is by right-clicking/control-clicking on
each of the links above and then selecting Save
as... or Save link as....
-
Add the appropriate files you downloaded to the directory/project
you created for this lab.
.java
Files: In most IDEs, .java
files
(i.e., source files) can just be copied into the project.
See the course "Help" page on your IDE for more information.
.class
and .jar
Files:
In some IDEs it is easier to use .class
files and in others it is easier to use a .jar
file
that contains the .class
files. Hence, you have been
provided with both.
See the course "Help" page on your IDE for more information.
Resources: In some IDEs, resources (e.g., images, data
files) need to be in a special directory whereas in others they
need to be in the working directory.
See the course "Help" page on your IDE for more information.
1. Getting Started:
To get started you should login
to
Gradescope using
your
dukes.jmu.edu
email and select the appropriate
course. (You should have already created an account and joined the
course!)
2. Submitting Simple Programs to Gradescope:
This part of the lab will help you gain the skills you need
to submit simple programs to Gradescope. If you have trouble at any point,
you should refer to the CS Department Wiki on
Submitting Code to Gradescope.
-
Start a file explorer or finder (depending on your operating
system) and navigate to the directory/folder that contains the
working source code (e.g., if you are using Eclipse, navigate to
the
src
directory/folder under the directory/folder
containing the project for this lab).
-
Click on the appropriate assignment. A dialog box should appear.
-
Select both
WhatAnEgo.java
and Rater.java
.
-
Drag the two selected files from the file explorer/finder into the
dialog box in the browser.
-
Click on Upload.
-
A dialog should appear telling you that your submission was
successful (not that your code is correct) and you should receive
an email telling you the same thing.
-
Close the dialog.
-
When the autograder finishes, a results page will be displayed.
-
Did your submission compile? How many points did you receive for that?
It did compile but no points were allocated to something as
straightforward as writing syntactically correct code.
-
Did your submission comply with the specifications? How many
points did you receive for that?
It did comply with the specifications but, again, that's
straightforward, so no points were allocated to it.
-
How many points did you earn for "Style"? Out of how many?
0 out of 20.
-
Your submission contained style defects and was graded "all or
nothing" (i.e., no partial credit was awarded). What are the
style defects?
In
WhatAnEgo.java
there are two style defects on line 5 (a
missing
@author
tag and a missing
@version
tag), one style defect on line 6 (the
{
is on the wrong
line), one style defect on line 7 (the first sentence in the comment
must end with a period), and one style defect on line 13
(the
{
is on the wrong line).
In Rater.java
there is one style defect on line 16, a missing @param
tag for the parameter name
.
-
How many points did you earn for the "OfficialTests"? Out of how many?
0 out of 80.
-
Your submission contained logic defects and was graded "all or
nothing" (i.e., no partial credit was awarded). What are the
logic defects?
The code doesn't pass one of the official tests
(named Test_Rater.ratingFor()
). In particular, the
return String
must end in an exclamation point, not a
period.
-
Modify
WhatAnEgo.java
and Rater.java
so
that they no longer have any style defects. (Hint: The
additions must be done manually. The formatting can be fixed by
Eclipse, you just need to select the code to re-format and click
on Source+Format.)
-
Before re-submitting to Gradescope, run Checkstyle locally
to ensure that you corrected all of the defects. (Remember, you should
always run Checkstyle locally before submitting to Gradescope. It will save
you time and reduce the work down by Gradescope, making it run faster
for everyone.)
-
Re-submit the two source files.
-
What is different from your last submission?
This submission earned 20 points for style.
-
Modify
Rater.java
so that
the ratingFor()
method returns a String
that ends in an exclamation point rather than a period.
-
Re-submit the two source files.
-
What is different now?
This submission earned 20 points for style and 80 points for
the official tests.
3. Submitting More Complicated Programs to Gradescope:
This part of the lab will help you gain the skills you need
to submit more complicated programs to Gradescope. Specifically, it will
help you gain the skills needed to submit
.zip
files
containing your programs.
-
Create a
.zip
file named submission.zip
that
contains WhatAnEgo.java
and Rater.java
at the top level. (If you need help, see the
CS Department Wiki on
creating .zip files.)
-
In Gradescope, start the submission process.
-
Now, instead of selecting the two source files and dragging them into the
dialog, drag the
.zip
file into the dialog.
-
What happened?
This submission earned 20 points for style and 80 points for
the official tests.
4. Finishing Up:
Remember to logout of Gradescope and shut down your browser.