How to calculate Branch and statement coverage for these?
Switch PC on
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook
a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage. 3 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
e) 2 tests for statement coverage, 3 for branch coverage
IF A > B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D Then
Print “Error”
ENDIF
a) 1 test for statement coverage, 3 for branch coverage
b) 2 tests for statement coverage, 2 for branch coverage
c) 2 tests for statement coverage. 3 for branch coverage
d) 3 tests for statement coverage, 3 for branch coverage
e) 3 tests for statement coverage, 2 for branch coverage
Questions by hereforquestions
Editorial / Best Answer
Answered by:
Kaizen
Can someone help my with this?
Minimum test Required for Branch Coverage and Statement coverage:
Disc = 0
Order-qty = 0
ReadnOrder-qty
If Order-qty >= 20 then
Disc = 0.05
If Order-qty >= 100 then
Disc = 0.1
else Disc = 0.02
End if End if
Showing Answers 1 - 32 of 32 Answers
Related Answered Questions
Related Open Questions
How to calculate Branch and statement coverage for these?
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook
a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage. 3 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
e) 2 tests for statement coverage, 3 for branch coverage
IF A > B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D Then
Print “Error”
ENDIF
a) 1 test for statement coverage, 3 for branch coverage
b) 2 tests for statement coverage, 2 for branch coverage
c) 2 tests for statement coverage. 3 for branch coverage
d) 3 tests for statement coverage, 3 for branch coverage
e) 3 tests for statement coverage, 2 for branch coverage
Questions by hereforquestions
Editorial / Best Answer
Answered by: Kaizen
Can someone help my with this? Minimum test Required for Branch Coverage and Statement coverage: Disc = 0 Order-qty = 0 ReadnOrder-qty If Order-qty >= 20 then Disc = 0.05 If Order-qty >= 100 then Disc = 0.1 else Disc = 0.02 End if End if
Related Answered Questions
Related Open Questions