Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

During software change process the programmer have already done refactoring during prefactoring phase, why is postfactoring needed? What is the difference between inspection and testing?

During software change process the programmer have already done refactoring during prefactoring phase, why is postfactoring needed?

What is the difference between inspection and testing? Give an example of a bug that is hard to find by inspection?

What is regression testing? What does regression testing prevent?

Explain the difference between dependency and coordination in a class interaction diagram graph with c++ code example for each?

If you have a code to incorporate your code changes through polymorphism or through a component class which one are you going to choose and why?

Give three examples of refactoring, when should each of them be applied and why are they important?

Associate the following types of refactoring with the prefactoring and postfactoring , justify each decision.

  1. Move function from one class to another.
  2. Extract superclass.
  3. Extract component class.
  4. Merge classes.

From the following function printposition(), extract a new function that returns the position of the beginning of a given string in a given text. You also have to give the revised printPostion().

Void printpostion()

{

Int i,j;

Char* text = 1234567890;

Int text_length = 10;

Char* array_to_search1 = 23;

Int array_to_search1_length = 2;

Int position1 = -1;

For (i=0; i< text_length array_to_search1_length+ 1; i++){

Bool found =true;

For (j=0 ; j< array_to_search1_length; j ++){

If (text [i+j] != array_to_search1[j]){

Found =false;

Break;

}

}

If (found){

Position1 = i;

Break;

}

}

Count <

}

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago