FAQ for Secure Gradebook Build-It-Break-It Project

ENEE 457, Fall 2021

Question: One of the options is delete assignment for gradebookadd. I was wondering what happens if an assignment gets added, a student is given a grade for the assignment, and then the assignment gets deleted. Should I assume that this can occur? In the case that this does happen, would I delete the associated student grade for that assignment as well?

Answer: Yes, this can occur and any grades entered for the deleted assignment will be deleted.

Question: For gradebookdisplay when doing the print_final, if some of the students have not received grades for an assignment, should it output an error? Or should I just use the initial grade for the student to calculate the final grade (for instance if all grades are initialized to zero)?For gradebookdisplay when doing the print_final, if some of the students have not received grades for an assignment, should it output an error? Or should I just use the initial grade for the student to calculate the final grade (for instance if all grades are initialized to zero)?

Answer: This is not specified so you may deal with this case as you choose. You can include an explanation in your design document.

Question: For gradebookadd, because we always take the last defined option in the command line arguments, do we need to throw an error if previously defined arguments are invalid?

For example, say a user entered in:

gradebookadd -N mygradebook -K 45ea448f -AG -AN midterm -FN J@@hn -LN Smith -G 95 -FN John

The "J@@hn" would technically be invalid because it is not alphanumeric, however this is later corrected with "JohN". So in this case, does the program need to print invalid and not allow the user to add this to the gradebook, or should we only be considering the latest option when determining its validity?

Answer: For simplicity, you may assume that the program prints invalid and does not wait to see if the argument is specified again.

Question: Do we need to do anything special if print final is called and the total weight of the assignments do not add up to 1? I was thinking the grade could be normalized with the current weight to reflect a percentage of the highest achievable grade.
Or should we just let it be and if we only had say one assignment with 0.5 weight just calculate the final grade to be 0.5*assignment grade

Anwer: No need to normalize. Just output the sum of weight times number of points received divided by number of points possible. It is ok if the weights do not add up to 1.

Question: If extra arguments are provided, for example:

setup -N mygradebook -A

Should this print invalid and return an error code? Or should we just ignore the -A since the required options were provided?

Answer: This should print invalid.

Question: I am using a CSV file for my gradebook and so when the gradebook is created it adds the .csv extension to it therefore if you run

setup -N mygradebook

it will create mygradebook.csv. Is it okay that my program has you specify the file extension too? Or should I remove the need to specify the extension

gradebookadd -N mygradebook.csv -K key -ACTION

Answer: No specific extension should be required. Remember that different students may be using different format files, but that we will use a single script to test for correctness. So the gradebook name can be any valid string that we choose for testing.

Question: Is it ok if we assign fixed lengths for some of the variables (names, # of assignments/students, etc.)?

Answer: In terms of passing the correctness tests, it is fine if you assume a reasonable maximum length for the names (e.g. 100 characters max). However, for the Break-It phase, you cannot assume an attacker will limit names to 100 characters and your code needs to safely handle this case without causing a buffer overflow or crashing.

Question: If we choose grade order and two students have the same grade, do we use alphabetical order from there?

Answer: It is not specified how to break ties, so it is up to you how to implement it.