2.4. Analysis


For Section 1 taught by Jeff Smith, the only concern is regarding the task 4. In this task, students are required to return a function as a value. Students were tested on this task with a programming question. The question, shown below, posed to students was rather challenging, and it is expected that many students would have difficulty answering this question.



Define a function ordered-tree->procedure that takes a list of symbols and an ordered tree and returns a function with the given list of symbols as its parameter list. The function should evaluate the expression represented by the ordered tree. So for example, the value of

      (make-ordered-tree 10 null)
      (make-ordered-tree 'y null))))

should be 50. Recall that leaves of an ordered tree are represented by trees with an empty list of children.

Hint: construct and evaluate a lambda expression for the function represented by the tree.


Above: Question assigned for Task 4 in CS 152 Section 1


For Section 2 taught by Johnny Martin, the task that students had the most difficulty with was Task 2 and 5.5. These tasks were tested by Midterm Exam 1 Question 17, shown below.



M1-Q17: 11 answers 5pts, 6 answers 4pts, 3 answers 3pts, 2 answers 2pts., 1 answer 1 pt, 13 answers 0pts.

Supports: TASK 5.5


Implement a tail-recursive JavaScript function, filterEvens that takes 1 argument, an array of integer numbers, and returns a new array containing only the even valued numbers of the argument array.

x = [1,2,3,4,5,6,7];
y = FilterEvenTailRec(x)

[1, 3, 5, 7]

Important: filterevens() must be tail recursive.


Above: Question assigned for Task 2 and 5.5 in CS 152 Section 2



This question is straight-forward, and tail recursion is one of the key concepts students should learn, according to the course outcomes. It is a concern that students have not learned this concept well.