James Madison University JMU - Department of Computer Science
Help Tools
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:

  1. 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.
  1. Start VSCode.
  2. Click on in the activity bar. (This will open the explorer view in the primary side bar.)
  3. Expand CS159 and the directory/folder labs.
  4. Create a directory/folder for this lab (e.g., named lab03) under the labs directory.
  5. Copy the two files that you downloaded into the directory/folder that you just created.
  6. Do not open either file.
  7. 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.
  1. 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 lab03 directory/folder).
  2. In Gradescope, click on the appropriate assignment. A dialog box should appear.
  3. Drag the .java files 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 files.)
  4. Click on Upload.
  5. 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.
  6. Close the dialog.
  7. When the autograder finishes, a results page will be displayed.
  8. 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.
    Expand
  9. 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.
    Expand
  10. How many points did you earn for "Style"? Out of how many?


    0 out of 20.
    Expand
  11. 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 7 (a missing @author tag and a missing @version tag), one style defect on line 8 (the { is on the wrong line), one style defect on line 9 (the first sentence in the comment must end with a period), and one style defect on line 15 (the { is on the wrong line).

    In Rater.java there is one style defect on line 18, a missing @param tag for the parameter name, and one style defect on line 23 (a defect involving whitespace).

    Expand
  12. How many points did you earn for the "OfficialTests"? Out of how many?


    0 out of 80.
    Expand
  13. 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.
    Expand
  14. 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.
    Expand
  15. 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.
    Expand
  16. Modify WhatAnEgo.java and Rater.java so that they no longer have any style defects (saving each file after each modification).
  17. 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.)
  18. Re-submit your code.
  19. What is different from your last submission?


    This submission earned 20 points for style.
    Expand
  20. Modify Rater.java so that the ratingFor() method returns a String that ends in an exclamation point rather than a period.
  21. Re-submit your code.
  22. What is different now?


    This submission earned 20 points for style and 80 points for the official tests.
    Expand
3. Finishing Up: Remember to logout of Gradescope and shut down your browser.

Copyright 2026