@Test public void getSpecialistFactorMediumRisk() throws Exception { assertEquals((double) level / 100 * mediumRiskFactor, mechanic.getSpecialistFactor(mediumRisk), delta); }
public double getSpecialistFactor(int risk) { switch (risk) { case 1: return lowRisk * level / 100; case 2: return mediumRisk * level / 100; default: return highRisk * level / 100; } }
Specialist extends Member { public double getSpecialistFactor(int risk) { switch (risk) { case 1: return lowRisk * level / 100; case 2: return mediumRisk * level / 100; default: return highRisk * level / 100; } } }
Specialist extends Member { public double getSpecialistFactor(int risk) { switch (risk) { case 1: return lowRisk * level / 100; case 2: return mediumRisk * level / 100; default: return highRisk * level / 100; } } Specialist(UUID id, String name, int salary, double level); protected  Specialist(); }
Specialist extends Member { public double getSpecialistFactor(int risk) { switch (risk) { case 1: return lowRisk * level / 100; case 2: return mediumRisk * level / 100; default: return highRisk * level / 100; } } Specialist(UUID id, String name, int salary, double level); protected  Specialist(); double getLevel(); double getSpecialistFactor(int risk); }
Specialist extends Member { public double getSpecialistFactor(int risk) { switch (risk) { case 1: return lowRisk * level / 100; case 2: return mediumRisk * level / 100; default: return highRisk * level / 100; } } Specialist(UUID id, String name, int salary, double level); protected  Specialist(); double getLevel(); double getSpecialistFactor(int risk);  }