1 | package com.epam.bootcamp.bmi_calculator.interfacesImplements; | |
2 | ||
3 | import com.epam.bootcamp.bmi_calculator.interfaces.UnitsInterface; | |
4 | ||
5 | public class UsBMI implements UnitsInterface{ | |
6 | | |
7 | private static final int usMultiplier = 703; | |
8 | | |
9 | private double bmi; | |
10 | | |
11 | public double getBMI(){ | |
12 |
1
1. getBMI : replaced double return with 0.0d for com/epam/bootcamp/bmi_calculator/interfacesImplements/UsBMI::getBMI → KILLED |
return this.bmi; |
13 | } | |
14 | | |
15 | /** | |
16 | * A US mértékegységnél kell konstans, amilve meg kell szorozni a súlyt. Ezt a szorzót a usMultiplier konstans tartalmazza | |
17 | */ | |
18 | public void setBMI(double weight, double height){ | |
19 |
3
1. setBMI : Replaced double multiplication with division → KILLED 2. setBMI : Replaced double multiplication with division → KILLED 3. setBMI : Replaced double division with multiplication → KILLED |
this.bmi = usMultiplier*weight/(height*height); // számolja a US bmi-t |
20 | } | |
21 | | |
22 | } | |
Mutations | ||
12 |
1.1 |
|
19 |
1.1 2.2 3.3 |