MetricBMI.java

1
package com.epam.bootcamp.bmi_calculator.interfacesImplements;
2
3
import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface;
4
5
public class MetricBMI implements UnitsInterface{
6
	
7
	private double bmi;
8
	
9
	public double getBMI(){
10 1 1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI → KILLED
		return this.bmi;
11
	}
12
	
13
	public void setBMI(double weight, double height){
14 2 1. setBMI : Replaced double multiplication with division → KILLED
2. setBMI : Replaced double division with multiplication → KILLED
		this.bmi = weight/(height*height); //számolja a metrikus BMI-t
15
	}
16
	
17
}

Mutations

10

1.1
Location : getBMI
Killed by : com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)
replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/MetricBMI::getBMI → KILLED

14

1.1
Location : setBMI
Killed by : com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)
Replaced double multiplication with division → KILLED

2.2
Location : setBMI
Killed by : com.epam.bootcamp.bmi_calculator.BMITest.BMITest5(com.epam.bootcamp.bmi_calculator.BMITest)
Replaced double division with multiplication → KILLED

Active mutators

Tests examined


Report generated by PIT 1.8.1