Systems Programming - Assignments

NWEN 241: 2019 Trimester 1

Click on the assigment (entry in first column) to view the assignment details. The assignment details will become available on the indicated Release Date.

Assignment Release Date Deadline Submission Link
Programming Assignment 1 11 Mar 2019 25 Mar 2019 https://apps.ecs.vuw.ac.nz/submit/NWEN241/Assignment_1
Programming Assignment 2 25 Mar 2019 8 Apr 2019 https://apps.ecs.vuw.ac.nz/submit/NWEN241/Assignment_2
Programming Assignment 3 8 Apr 2019 6 May 2019 https://apps.ecs.vuw.ac.nz/submit/NWEN241/Assignment_3
Programming Assignment 4 6 May 2019 20 May 2019 https://apps.ecs.vuw.ac.nz/submit/NWEN241/Assignment_4
Programming Assignment 5 20 May 2019 9 Jun 2019 https://apps.ecs.vuw.ac.nz/submit/NWEN241/Assignment_5

Programming Assignment 5 FAQ

Question: What does "If the message has the contents BYE" exactly mean?
Answer: It means the entire contents of the message should be only BYE. The same answer applies to GET and GET followed by a number. If the received message is invalid, the server may reply with an error message, or stay silent.

Programming Assignment 4 FAQ

Question: Are we permitted to define additional member variables/functions for the parent class AbstractDbTable whose implementation would be common to both vector and linked-list versions?
Answer: Yes, you may add additional members to AbstractDbTable but you will need to provide sufficient comments on why you made that choice.

Programming Assignment 3 FAQ

Question: In Task 2, the handout states "Minimally, the class should have member variables table, rowsTotal, and rowsUsed as described in the Program Design section. These variables should be unsigned integers and should be private." Should table be an unsigned integer?
Answer: No, table should be a pointer to an array of structures that is dynamically allocated. The unsigned integer only applies to rowsTotal, and rowsUsed.

Programming Assignment 2 FAQ

Question: When counting occurrences, how to handle strings with overlapping matches? For example, how many occurrences of hihi are there in hihihihi?
Answer: For simplicity, count only the non-overlapping occurrences. In the example, there are 2 occurrences of hihi in hihihihi (at positions 0 and 4 relative to the start of the string), and 1 occurrence of hihihi in hihihihi (at position 0 relative to the start of the string).
Question: For Tasks 6 and 9, the marks for the marking criteria doesn't sum up to 100%.
Answer: There is a typo on the allocation for Completeness criteria. It should be 40%.
Question: What does pointer notation mean?
Answer: Pointer notation refers to use of pointers and suitable pointer operations for accessing data. Slides 8 and 9 of Week 3 Lecture 2 provide good examples.
Question: The handout states that the deadline is 1 April while course wiki states 8 April. Which one is correct?
Answer: The deadline is 8 April, not 1 April.
Question: In Task 3, what does "Explain individually the printed values" mean?
Answer: It means that you should provide an explanation on how you got the printed values.
Question: Does array subscripting count as pointer notation? (Array subscripting example: a[3] to access the 4th element of array a).
Answer: No. See above question on what pointer notation means.
Question: Task 11 requires that pointer notation must be used for accessing the search string, buffer and integer array. What does it mean for the search string which is passed as a std::string (not pointer)?
Answer: You may use the search string variable as it is in expressions / statements. However, you may not use [] to access the individual letters of the string.
Question: The words "numeric value" appears in tasks 2 and 4. What exactly is meant by this?
Answer: Those questions are seeking specific numbers. The reason for stating it that way is that there are 2 ways to answer those questions. For instance: if x is an ordinary variable located at address 100, what is &x? You may answer the question in two ways: (a) &x is the address of x, or (b) 100. Both answers are correct. The assignment is seeking the second answer, not the descriptive answer.
Question: In Task 7, how to handle a non-empty buffer without any newline character, or when the contents of the buffer after a newline does not have another newline? For example, how many lines are there in "The quick brown fox jumps over the lazy dog." and "The quick brown fox\njumps over the lazy dog."
Answer: Count both as 1 line. "The quick brown fox jumps over the lazy dog." has 1 line and "The quick brown fox\njumps over the lazy dog." has 2 lines.

Programming Assignment 1 FAQ

Question: Should the editing buffer be treated as a C string, i.e., always have a null charater at the end?
Answer: No, the editing buffer should be treated as a normal array. This means that it may not contain any null characters at all, or null characters may appear anywhere in the buffer.
Question: In Task 3, what happens if either str or replacement is empty ("")?
Answer: If str is empty (regardless of the value of replacement), no string replacement should occur. If replacement is empty, then this is tantamount to deleting the string str.
Question: Can functions from the standard C library be used?
Answer: Yes
Question: In Task 8, what happens if the character immediately after a newline character is a whitespace?
Answer: By rights, the whitespace should be removed. But since the hand-out does not specify that the first character of a row should be a non-whitespace character, then it is not necessary to remove the whitespace character.
Question: For Tasks 5 and 9, the marks for the marking criteria doesn't sum up to 100%.
Answer: There is a typo on the allocation for Completeness criteria. It should be 40%.