WebFund 2024F: Assignment 3: Difference between revisions

From Soma-notes
Line 22: Line 22:
# [2] How could you change submitdemo so submissions have six questions rather than five? Be sure to specify all the places in the code that must be changed. Assume that only valid submissions are uploaded.
# [2] How could you change submitdemo so submissions have six questions rather than five? Be sure to specify all the places in the code that must be changed. Assume that only valid submissions are uploaded.
# [2] Create a submission that is valid except for having the wrong number of questions (i.e., not five). Such a submission will be allowed to be upload even though it is invalid. Why? And what is a quick but correct way to fix it?
# [2] Create a submission that is valid except for having the wrong number of questions (i.e., not five). Such a submission will be allowed to be upload even though it is invalid. Why? And what is a quick but correct way to fix it?
# [2] How could you use a command-line web request tool (such as <tt>wget</tt> or </tt>curl</tt>) to upload data that is not a properly validated submission?
# [4] How could you change submitdemo so that it also validates submissions on the server? The validation should use the same logic as does the client-side validator.

Revision as of 19:43, 8 November 2024

This assignment is not yet finalized.

Please submit the answers to the following questions via Brightspace by November 20, 2024. There are ?? points in ?? questions.

Submit your answers as a plain text file following this template. Name your answer file "comp2406-assign3-<username>.txt" (where <username> is your MyCarletonOne username). Please make sure to use your correct student ID number otherwise your grades may not be properly recorded.

Your answers will be parsed by a script in order to help with grading so please preserve the format of the template. No other formats will be accepted.

Note that the file should be a text file, preferably a UNIX text file (so LF line endings, not CRLF). (See the Wikipedia page on text files to learn more.)

You may use this validator page to make sure your answer file is properly named and formatted. Submissions that do not validate are likely to receive an automatic grade of zero.

Please solve each question rather than look up their answers. Solutions where the answer was found through an online search or answered by a friend or AI will likely get partial or no marks. The questions can only be fully answered by documenting your journey to find the answer rather than the answer itself. Outside resources and other individuals should be used to help with specific technical problems (e.g., JavaScript syntax and semantics), not to solve the problem itself. Your solution should be your own, and the journey by which you reach it should be your own.

Having said this, for each question, please include what outside resources you used to complete each of your answers, including other students, man pages, and web resources (including AI services). You do not need to list help from the instructor, TA, or information covered in lecture or tutorial.

Questions

All of these questions are in reference to submitdemo from Tutorial 7.

  1. [2] How could you change submitdemo so it accepted submissions named comp2406-assign3-soma.txt? Be sure to specify all the places in the code that must be changed. Assume only valid submissions are uploaded.
  2. [2] How could you change submitdemo so submissions have six questions rather than five? Be sure to specify all the places in the code that must be changed. Assume that only valid submissions are uploaded.
  3. [2] Create a submission that is valid except for having the wrong number of questions (i.e., not five). Such a submission will be allowed to be upload even though it is invalid. Why? And what is a quick but correct way to fix it?
  4. [2] How could you use a command-line web request tool (such as wget or curl) to upload data that is not a properly validated submission?
  5. [4] How could you change submitdemo so that it also validates submissions on the server? The validation should use the same logic as does the client-side validator.