Question: package demo; public class CalculatorExample { /** * This method adds two integers and provide the results as a return * * @param a *

package demo;

public class CalculatorExample {

/** * This method adds two integers and provide the results as a return * * @param a * @param b * @return The return value is the sum of the two numbers. */ public int add(int a, int b) { return a + b; }

/** * This method subtracts two integers and provide the results as a return * * @param a * @param b * @return The return value is the subtraction of the two numbers. */ public int subtract(int a, int b) { return a - b; }

/** * This method multiplies two integers and provide the results as a return * * @param a * @param b * @return The return value is the multiplication of the two numbers. */ public int multiply(int a, int b) { return a * b; }

/** * This method divides two integers and provide the results as a return * * @param a * @param b * @return The return value is the division of the two numbers. */ public int divide(int a, int b) { return a / b; }

/** * This method will sum the numbers from n down to 0. * * @param start * This is the start value. * @return The return ill be the summation of all the numbers. */ public int summation(int start) { int retVal = 0; while (start >= 1) { retVal += start; start--; } return retVal; }

/** * The method will determine if a number is positive or not. * * @param number * @return */ public boolean isPostive(int number) { return number >= 0; }

/** * This method will compare two numbers * * @param a * @param b * @return 0 if a ==b, 1 if a >b, -1 if a b) { retVal = 1; } else if (a

return retVal;

}

}

package demo; public class CalculatorExample { /** * This method adds two

Consider the PIT mutation tool. Apply PIT to the "CalculatorExample.java" program and generate tests to kill the PIT mutants. Your tests should be as close to mutation-adequate as you can make them. That means you should be able to justify unkilled mutants in your report. Note: This tool is aimed at practicing developers, so it is relatively easy to deal with. Required Deliverables: 1) A class named "CalculatorTest that include all of your designed test cases. 2) A report document that contains the statistics generated by the PIT tool (just copy them). Also, the report should include a justification for live mutants that exist after executing your designed test cases. Submission Deadline: 01/01/2022 23:55 PM No submission will be accepted after 01/01/2022 at 23:55 PM. No excuse will be given under any circumstances. No extensions will be given, so plan to submit on time. Important note: Corrupted files will get a zero grade. It is your own responsibility to check that the uploaded file is readable. You should deliver a working code. A code with compilation errors will get a zero. Submitting your code as a pdf or document file will result in a grade of zero. You should submit a java files

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!