For the code fragment given below, which answer

correctl

Loading

Choose the correct option.

For the code fragment given below, which answer

correctly represents minimum tests required for statement and branch

coverage respectively?

Discount rate=1;

Fare = 1000;

If ((person == “senior citizen”) and (“travel month = January”))

Bonuspoints = 100+Bonuspoints

If (class==”first”)

discountRate = .5;

Fare = fare * discountRate;



A. Statement Coverage = 1, Branch Coverage = 2
B. Statement Coverage = 2, Branch Coverage = 2
C. Statement Coverage = 1, Branch Coverage = 3
D. Statement Coverage = 2, Branch Coverage = 4

Leave a Comment