针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。 Switch(value) { Case 0: 0ther

10 查阅

针对下列程序段,需要______个测试用例才可以满足语句覆盖的要求。

Switch(value)

{

Case 0:

0ther=30;

Break;

Case 1:

ther=50;

Break;

Case 2:

ther=300;

Case 3:

ther=other/value;

Break;

Default:

ther=other * value;

}

A) 2

B) 3

C) 4

D) 5

A.

B.

C.

D.

参考答案:

C

计算机四级