For the following piece of code, how many test cases are needed to get 100% statement coverage?

Procedure X

Read (Color) // Input color from user

IF (Color == “Red”) THEN

Call Roses(Color)

ELSEIF (Color == “Blue”) THEN

Call Violets(Color)

ELSE

PRINT “User is no Shakespeare”

SaveToDatabase(Color)

End Procedure X

A. 5

B. 3

C. 1

D. 2

Answer Posted / toshimathur

B

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write test cases on laptop???

14948


how to prepare a test case for online restaurant table reservation system. plz give an answer ASAP, email at suja_rvndrn@yahoo.co.in

5281


Explain the smoke testing?

738


Give me a example that differentiate Test case Procedure,Test case Scenario,Test case Discription & test steps.

2312


Why does the boundary value analysis provide good test cases?

786






Can any1 tell me how to do and Integration test design and test cases for Order Inventory system for use cases. ALso how is that going to differ from System Testing. The system is similar to amazon.com online ordering system and you can place order by calling customer call center.

2014


Explain which test cases are written first black boxes or white boxes?

762


What are basic types of test cases?

813


how to test a UI and aslo we need to check a log data fil which gets populated in the db.for this two scenarios give me test cases

2068


how to write a test cases for courier offices?

3452


What are the test cases for mouse?

948


Can anybody help me in writing test cases for a scenario? need help at the earliest. will send you the requirement doc to your email id. thanks raj

1930


What are the Test Cases Comes under Regression Suite?

591


How to write test cases for manual testing? What are the main syntex for writing test cases for Junit?

2581


write test cases on file open dialog box in notepad

1300