Programming questions assignment

profileAdeel Iqbal
assignment_cos10007_rubric_for_students1.pdf

COS10007 Assignment TP2 2016 Marking Guide

Qn1. Write…

1. C++, e.g. name space 0.50 2. Main() 0.50

3. Comments/ structure 0.50 4. Correct function header/prototype 0.50 5. Run correctly 0.50 6. User inputs Range and row number 0.50 7. Proper shape 2.00 8. Find the sum of the row 1.00 9. Over all 0.25

Qn2. Write ...

1. Comments/structure 0.25 2. Proper structure declarations and pointer declarations 0.50 2. Correct function header 0.50

3. Body sortedInsert 2: a. // Special case for the head end 0.50 b. // Locate the node before the point of insertion 0.50 c. // insert 1.00

Body removeRedundant 2:

a. // do nothing if the list is empty 0.50 b. // Compare current node with next node 0.50

c. // Remove duplicate numbers 1.00

Qn3. Write…

1. Comments/structure 0.25

2. Proper structure declarations and pointer declarations 0.50 3. Correct function header 0.50 4. Body 5:

a. // do nothing if the list is empty 1.00

b. // check and delete if the first node matches with the ‘key’ 1.00 c. //call findnode() function inside delete()function 1.00 d. //delete the node after finding the position 1.00

Qn4. Write ... 1. Main(), other supporting functions 0.50 2. Appropriate call function 0.50 3. Comments/ structure 0.50 4. Correct function header/prototype 0.50 5. Run correctly 0.50

6. Using one-dimension array 0.50 7. Check input between 0 and 100 0.50 8. Sorting algorithm 2.75:

a. Uses a bubbleSort() function ... 1.00 b. Write another function ... 1.25

9. Discuss the Big O 0.25x2