Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[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]

image text in transcribed

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

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

More Books

Students also viewed these Databases questions

Question

Identify the main sources of stress and how it affects health.

Answered: 1 week ago