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](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66d3a2b77dfe4_78266d3a2b6f2aa8.jpg)
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
Get step-by-step solutions from verified subject matter experts
