Question

In: Computer Science

Given are the following low-level requirements: LL10.3 IF( ((numberOfSatellites < 4) AND ( receiverFlag = TRUE))...

Given are the following low-level requirements:

LL10.3

IF( ((numberOfSatellites < 4) AND ( receiverFlag = TRUE))

|| ((numberOfSatellites >= 4) AND (receiverFlag = FALSE)) )

WriteErrorMessage()

ELSE

IF( timeOfWeek > 0)

ComputePosition()

ENDIF

Suppose this low-level requirement is implemented as follows:

if( ( (numberOfSatellites < 4) && (receiverFlag == TRUE) ) || (

(numberOfSatellites >= 4) && (receiverFlag == FALSE) ) )

{

WriteErrorMessage();

} else if (timeOfWeek > 0)

{ ComputePosition(); }

How many tests are required to achieve (explain your answer and give the test cases)

: a) Statement Coverage

b) Condition Coverage

c) Decision/Condition Coverage

d) Multiple Decision/Condition Coverage

e) Modified Condition/Decision Coverage  

Give examples of a set of test cases that would achieve MC/DC.

Solutions

Expert Solution

STATEMENT COVERAGE

We require a minimum of 2 test cases to run every statement.

1.  numberOfSatellites = 3, receiverFlag = TRUE

2. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 2

CONDITION COVERAGE

Here, each condition takes all possible outcomes at least once. Hence we require a minimum of 4 test cases.

1. numberOfSatellites = 3, receiverFlag = TRUE

2. numberOfSatellites = 3, receiverFlag = FALSE , timeOfWeek = 2

3. numberOfSatellites = 5, receiverFlag = FALSE

4. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 0

DECISION / CONDITION COVERAGE

We require a minimum of 6 test cases.

1. numberOfSatellites = 3, receiverFlag = TRUE

2. numberOfSatellites = 3, receiverFlag = FALSE , timeOfWeek = 2

3. numberOfSatellites = 5, receiverFlag = FALSE

4. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 2

5. numberOfSatellites = 3, receiverFlag = FALSE , timeOfWeek = 0

6. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 0

MULTIPLE DECISION / CONDITION COVERAGE

Same as decision /condition coverage.

MODIFIED DECISION / CONDITION COVERAGE

We require a minimum of 6 test cases.

1. numberOfSatellites = 3, receiverFlag = TRUE

2. numberOfSatellites = 3, receiverFlag = FALSE , timeOfWeek = 2

3. numberOfSatellites = 5, receiverFlag = FALSE

4. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 2

5. numberOfSatellites = 3, receiverFlag = FALSE , timeOfWeek = 0

6. numberOfSatellites = 5, receiverFlag = TRUE, timeOfWeek = 0


Related Solutions

now identify 4 risks in this project with different level(low, medium, high) of the impact and...
now identify 4 risks in this project with different level(low, medium, high) of the impact and probability. justify your answer
A. Discuss the eligibility requirements and level of tax for each of the following entity types:...
A. Discuss the eligibility requirements and level of tax for each of the following entity types: S Corporation C Corporation Partnership Limited Liability Company B. What is the control requirement of § 351? Describe the effect of the following in satisfying this requirement: A shareholder renders only services to the corporation for stock. A shareholder renders services and transfers property to the corporation for stock. A shareholder has only momentary control after the transfer. A long period of time elapses...
Which of the following is TRUE? A. The confidence interval is narrower if the level of...
Which of the following is TRUE? A. The confidence interval is narrower if the level of significance is smaller. B. The confidence interval is wider if the level of confidence level is larger. C. The confidence interval is narrower if the sample size is smaller. D. The confidence interval is wider if the sample size is larger.
provide a graduate-level response to each of the following question: Q. What are the requirements to...
provide a graduate-level response to each of the following question: Q. What are the requirements to obtain a trademark? What federal acts regulate obtaining trademarks
answer the following true or false for each: Part of the ongoing compliance requirements for NFPs...
answer the following true or false for each: Part of the ongoing compliance requirements for NFPs is for them to file some version of the Form 990 with the IRS each year. Generally speaking, a NFP board of directors need not keep minutes of its meetings. Board of Director Treasurers are responsible for the bank account and being sure that the Form 990 is filed. The tool the IRS is most likely to use when an officer in a tax-exempt...
1. Which of the following are true of genes? a. They blend together at the level...
1. Which of the following are true of genes? a. They blend together at the level of genotype b. They code for a protein c. Through mutation they come in new forms such as “jeggings” d. None of the above 2. Which of the following is true of a theory as the term is used in the hard sciences? a. It is a description of a consistent phenomenon, not an explanation b. It is a hypothesis about known data points...
Question 2) Which of the following is true? a) The significance level of a test is...
Question 2) Which of the following is true? a) The significance level of a test is the probability that the null hypothesis is false. b) The power of a test is the probability of accepting a null hypothesis that is true. c) If a null hypothesis is rejected against an alternative at the 5% level, then using the same data, it must be rejected against that alternative at the 1% level. d) If a null hypothesis is rejected against an...
Instructions: Using the following data, complete the requirements given below. When you are given amounts to...
Instructions: Using the following data, complete the requirements given below. When you are given amounts to assume as the answers to previous requirements, be careful to use such assumed amounts rather than your answers (in order to minimize carry-through errors). The Finishing Department of Curtis Corporation reports the following for January 2011: Production: All materials are added at the beginning of the process. Beginning work in process 20,000 units, 60% complete. Units started into production 240,000 units. Ending work in...
True or False Questions: 4. When analysing mixed costs with the high-low method, begin by identifying...
True or False Questions: 4. When analysing mixed costs with the high-low method, begin by identifying the period with the lowest level of activity and the period with the highest level of activity. 28. Organization-sustaining activities are carried out regardless of how many units are made, how many batches are run, or how many different products are made. 29. On a per unit basis, a fixed cost varies inversely with the level of activity. 30. One of the distinct advantages...
Does the official unemployment rate overstate the true level of unemployment, understate the true level of...
Does the official unemployment rate overstate the true level of unemployment, understate the true level of unemployment or accurately measure the true level of unemployment? Be certain to clearly and carefully explain your answer.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT