hi, this is my school's past year exam question, i can't spot the error.Can anyone point it out to me. thanks.
---------
The method given below is intended to find the number that is the minimum of all the numbers in
the Vector v that are larger than the minimum of the elements in v. You may assume that v contains
at least two elements, and that that the first two elements are different numbers.
i. Describe a vector of Integers that will give the correct result using the above method.
[2 marks]
ii. Describe a vector of Integers that will give incorrect results using the above method.
[2 marks]
iii. Outline how you would go about repairing the fault in the program so it would give correct
results with both your tests. [2 marks]
[ October 26, 2006: Message edited by: Syamsul Hussin ]
---------
The method given below is intended to find the number that is the minimum of all the numbers in
the Vector v that are larger than the minimum of the elements in v. You may assume that v contains
at least two elements, and that that the first two elements are different numbers.
i. Describe a vector of Integers that will give the correct result using the above method.
[2 marks]
ii. Describe a vector of Integers that will give incorrect results using the above method.
[2 marks]
iii. Outline how you would go about repairing the fault in the program so it would give correct
results with both your tests. [2 marks]
[ October 26, 2006: Message edited by: Syamsul Hussin ]