ECE 322 Assignment 2-Software specifications for a simple e-shopping system Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (2 votes)

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).

 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.

  • 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.
  • 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.                                                                                          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}

1 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?

 

 

  • Assignment2-zasgmh.zip