Question: [Verification and Validation] 1) Draw a control flow graph for the program above. 2) From the control flow graph in Question 1, answer the following

[Verification and Validation]

[Verification and Validation] 1) Draw a control flow graph for the program

1) Draw a control flow graph for the program above.

2) From the control flow graph in Question 1, answer the following questions: 2.1) Is there a set of test inputs that satisfies node coverage on the graph? If so, find a smallest set that satisfies node coverage. 2.2) Is there a set of test inputs that satisfies edge coverage on the graph? If so, find a smallest set that satisfies edge coverage.

1: 2 public boolean isLeapYear(int theYear) { boolean ans false; if (theYear 100) { 4 if (theYear = 40) { theYear - theYear + 100; 6 7 theYear = theYear + 1900; 10: if the ear % 4 = 0) if (theYear % 100 != 0) 12: 13: 14: 15: 16: 17: 18: ans = true; } else if (theYear % 400 = 0) ans = true; return ans

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!