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:
-
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....
1. Getting Started:
This part of the lab will help you get started.
-
Create a directory/folder for this lab
(e.g., named
lab03
) under the src
directory.
-
Copy the files you downloaded to the directory/folder that you
just created.
-
Start VSCode.
-
Click on in the activity bar. (This
will open the explorer view in the primary side bar.)
-
Expand
CS159
, src
, and the
directory/folder you created for this lab.
-
Do not open either file.
-
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 Java Programs to Gradescope:
This part of the lab will help you gain the skills you need
to submit Java 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 (i.e., the
src
directory/folder).
-
Create a
.zip
file named lab03.zip
that
contains the directory/folder lab03
at the top-level.
(If you need help, see the CS Department Wiki on
creating .zip files.) This .zip
file will
contain a directory named lab03
that contains the
files Rater.java
and WhatAnEgo.java
.
-
In Gradescope, click on the appropriate assignment. A dialog box
should appear.
-
Drag
lab03.zip
from the file explorer/finder into the
dialog box in the browser. (Or, click in the dialog box, browse to
the appropriate directory, and select the file lab03.zip
.)
-
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.
-
Open
WhatAnEgo.java
and Rater.java
in VSCode. What parts/lines in the code have code annotations
(i.e., are brought to your attention in some way)?
The lines that have style defects.
-
Hover the cursor over the name
WhatAnEgo.java
and Rater.java
in the VSCode Explorer. WHat happens?
A message appears that indicates how many "problems" there are in each file.
-
Modify
WhatAnEgo.java
and Rater.java
so
that they no longer have any style defects (savind each
file after each modification).
-
Before re-submitting to Gradescope, confirm that the two
files no longer contain any "problems". (Remember, you should
always use Checkstyle locally before submitting to Gradescope. It
will save you time and reduce the work down by Gradescope, making
it run faster for everyone.)
-
In a file explorer/finder, delete the out-of-date
.zip
file.
-
Re-create the
.zip
file and re-submit it.
-
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.
-
Delete the out-of-date
.zip
file, re-create it, and
re-submit it.
-
What is different now?
This submission earned 20 points for style and 80 points for
the official tests.
3. Finishing Up:
Remember to logout of Gradescope and shut down your browser.