$30
1 of 2
ECE 322
SOFTWARE TESTING AND MAINTENANCE
Assignment #2
(return to the appropriate box- 2nd floor of DICE building)
Total: 40 points
Value 10 points
1. Develop software specifications for a simple e-shopping system using the formalism of
finite state machines. Consider some selected functionality. Make appropriate
assumptions.
Note: there could be a variety of possible solutions; there is nothing wrong about that.
Your answer will be evaluated on a basis of its completeness and correctness (taking into
consideration the assumptions you have made).
Value 10 points
2.Suggest a collection of test cases to test a procedure finding a maximum of three integer
numbers
maxofThreeNumbers(int n1, int n2, int n3)
Consider (i) exhaustive testing and (ii) error guessing.
3.(i) Suppose that an application has n inputs (variables) and each variable partitions its
input space in m equivalence classes. Determine the number of equivalence classes. How
many tests do you require. Could be the number of tests made lower? Do detailed
calculations for n =10 and m =10.
(ii) a system invokes function S if the reading of a given sensor is within the [a, b] or [c,
d], b <c. The entire range of possible values is [-50, 50]. Identify equivalence classes.
List a collection of tests.
(iii) generalize the problem in (ii) by considering that there are two sensors where the
function is invoked for the sensors’ readings are in [ai, bi] or [ci, di], bi <ci, i=1, 2. How
many test cases do you require here.
Value 10 points
4. Consider a 3-dimensional input domain described as
W = [0, 10] [-5, 20] [0, 7]
(viz. there are 3 input variables assuming values in the corresponding intervals). In this
domain there are three equivalence classes
W1= {(x, y, z) | max (|x-1|, |y-1|, |z-1|) e}
× ×
≤
2 of 2
W2= {(x, y, z) | max (|x-5|, |y-10|, |z-4|) e}
W3 = W-W1-W2
where e is a certain positive number. What should be possible values of e so that these
equivalence classes form a partition?
≤