Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Answer (a) to (i) they are all apart of the question 4 4. For the following program P3 written in pseudo-code, given the test

Please Answer (a) to (i) they are all apart of the question 4

4. For the following program P3 written in pseudo-code, given the test set T: T == {t1 == <-5, 2>, t2 == <3, 1>, t3 == <9, 3>} a) What is the domain for statement coverage of P3? Note: do not include syntactical markers such as comments, {, }, else, begin, end. b) What is the statement coverage for T? c) What test cases (if any) should you add to T to provide 100% statement coverage? d) What is the domain for decision coverage of P3? e) What is the decision coverage for T? f) What test cases (if any) should you add to T to provide 100% decision coverage? g) What is the domain for condition coverage of P3? h) What is the condition coverage for T? i) What test cases (if any) should you add to T to provide 100% condition coverage?

Program P3 1) integer A, B, C; 2) input (A, B); 3) if (A<-8 or A>8 or B<0 or b>3) 4) { 5) output (Boundary condition failure on inputs.); 6) } 7) else // valid input 8) { 9) C = A * B; 10) if (A < 0) 11) { 12) C = C + A + B; 13) if (B > 1) 14) { 15) C = C + 3; 16) } // end if (B>1) 17) C == C * C; 18) } // end if (A<0) 19) else 20) { 21) C = C A B; 22) if (B == 1) 23) { 24) C = B * C; 25) } // end if (B=1) 26) else 27) { 28) C = B / C; 29) } // end else !(B=1) 30) C = C + 2; 31) } // end else !(A<0) 32) output (A, B, C); 33) } // end else valid input 34) return 0; 35) end;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

4. Does cultural aptitude impact ones emotional intelligence?

Answered: 1 week ago