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


    0 out of 20.
    Expand
  12. 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.

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


    0 out of 80.
    Expand
  14. 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
  15. 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
  16. 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
  17. Modify WhatAnEgo.java and Rater.java so that they no longer have any style defects (savind each file after each modification).
  18. 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.)
  19. In a file explorer/finder, delete the out-of-date .zip file.
  20. Re-create the .zip file and re-submit it.
  21. What is different from your last submission?


    This submission earned 20 points for style.
    Expand
  22. Modify Rater.java so that the ratingFor() method returns a String that ends in an exclamation point rather than a period.
  23. Delete the out-of-date .zip file, re-create it, and re-submit it.
  24. 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 2024