Question: Consider the program specification: If the input is an ordered pair of numbers, ( x , y ) , a message is output stating whether

Consider the program specification:
If the input is an ordered pair of numbers, (x, y), a message is output stating whether they are in ascending order, descending order, or equal. If the input is other than an ordered pair of numbers, an error message is output.
and associated equivalence classes:
{(x, y)| xy }(V)
{(x, y)| x=y }(V)
{ input is other than an ordered
pair of numbers }(I)
Indicate whether or not the underlying wishful assumption of partition testing would hold for
each of the following program designs. Circle "yes" or "no" as appropriate for each. To com-
pensate for random guessing, your score in points will be 3 times the number of [correct
minus incorrect] answers, or 0 whichever is greater. Therefore, if you are not more than\
50% sure of your answer, consider skipping the item.
a. if (input is other than an ordered pair of numbers) yes no
then output(invalid input)
else
if (xy OR x is odd) then output(descending order)
else
output(equal)
end_if_else
end_if_else
end_if_else
b. if (input is other than an ordered pair of numbers) yes no
then output(invalid output)
else
if (x=y) then output(descending order)
end_if_else
end_if_else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!