Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[Regression testing] The following code fragment contains a function for checking whether a year is a leap year. Suppose a programmer, called Bill, wrote this

[Regression testing]

The following code fragment contains a function for checking whether a year is a leap year. Suppose a programmer, called Bill, wrote this function but later found an error in his code. He subsequently debugged the program by replacing the code in line 16 from return true; to return false;.

image text in transcribed

Before Bill found this error, he tested his function using the following test input:

image text in transcribed

After he made changes to the program, Bill plans to perform regression testing by re-testing the program using the previous test inputs. Due to resource constraints, he is allowed to pick only one previous test input to test the modified program. Which test input in the above test set should Bill choose to perform regression testing and why should such test input be used?

1: public boolean isLeapYear (int theYear) f if (theYear 40) theYear - theYear + 1900 l else f 9 10: if (theYear % 4 0) if (theYear % 100 ! 0) { 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:1) return true; return true; elsef ; Change to "return false; " } else f return false

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago