Question
Program P1 : 1) integer A, B; 2) input (A); 3) while (A > 0) 4) { 5) A = 2 * A; 6) if
Program P1 :
1) integer A, B;
2) input (A);
3) while (A > 0)
4) {
5) A = 2 * A;
6) if (A < 20 or A > 30)
7) {
8) B = A * 2;
10) }
11) else
12) {
13) B = A + 2;
15) }
16) output (A, B);
17) input (A);
18) }
19) end;
T = {t1=<4>, t2=<25>, t3=<-1>} or T = {t1=, t2=, t3=}
What is the statement domain for P1? Express as line numbers. Exclude syntactical markers, such as {, }, else, and end.
What is the statement coverage of T for P1? Express as a fraction.
If the statement coverage of T for P1 is less than 100%, what test cases do you need to add to get 100% statement coverage?
What is the decision domain for P1? Express as line number) decision.
What is the decision coverage of T for P1? Express as a fraction.
If the decision coverage of T for P1 is less than 100%, what test cases do you need to add to get 100% decision coverage?
What is the condition domain for P1? Express as line number) condition.
What is the condition coverage of T for P1? Express as a fraction.
If the condition coverage of T for P1 is less than 100%, what test cases do you need to add to get 100% condition coverage?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started