Information Technology Reference
In-Depth Information
SXEOLFVWDWLFERROHDQHTXDO9DOXHVLQW>@DUU^
IRULQWL LDUUOHQJWKL L^
LIDUU>L@ DUU>L@
UHWXUQIDOVH
`
UHWXUQWUXH
`
Variations : This type of question can be presented in different forms: (a) deter-
mine whether a given solution to a given problem is correct (as in the example pre-
sented); (b) check if a given solution to a given problem is correct and explain your
answer; (c) if the given solution is incorrect, give an example of an input that shows
it; (d) if the given solution is incorrect, give an example of an input that presents a
correct output and, therefore, may mislead one to conclude that the given solution is
correct; (e) if the given solution is incorrect, correct the solution by introducing the
minimal required changes (without this restriction, students may present a totally
different solution); (f) the presented solution can contain more than one mistake,
and the question can state it explicitly or not.
Additional variations of this type of questions may address syntactic mistakes.
It is suitable to present such variations while introducing new instructions or data
structures. It is not recommended, however, to use these variations in more ad-
vanced stages since they do not indicate learners' understanding of the algorithmic
problem, and, further, they do not contribute meaningfully to learners' understand-
ing since, in fact, the compiler directs how to debug such mistakes.
Discussion : In order to solve this type of questions, students should apply al-
gorithmic thinking and logical skills. Here, as in Type5 questions, students should
analyze a solution that may not fit their own way of thinking had they been asked to
develop a solution. However, since the purpose of the solution is given, these tasks
are considered easier than Type5 questions.
In the example presented, the two minimal required corrections are: (1) change
the increment of variable i to 1 (instead of 2 ); (2) change the range of variable i to be
i < arr. length-1 . Correction (1) is based on a logical consideration, while correction
(2) addresses the array index, which is a more technical consideration.
9.2.7
Type7. Completion of a Given Solution
Description : A given problem and an incomplete solution of the given problem, in
which some of the instructions are missing, are presented to the learners. The learn-
ers are asked to complete the missing instructions, so that the solution will solve the
problem correctly.
Example : The following method was written by a student as a solution for the
following problem: Write a method that for a given array of integers returns the
number of array elements that are bigger than their two neighbors (the previous ele-
ment and the subsequent element in the array).
Search WWH ::




Custom Search