Fix du cas exceptionnel du visiteur de 14 ans qui devait être traité comme un enfant et non comme un adulte

This commit is contained in:
Feror 2025-01-23 12:15:09 +01:00
parent 2294ce5351
commit a93f449d76

View file

@ -5,7 +5,7 @@ public class Visitor {
private FeeCalculationStrategy feeCalculationStrategy;
public Visitor (int age) {
if (age < 14) {
if (age <= 14) {
feeCalculationStrategy = new FeeCalculationStartegyForChildren();
} else {
feeCalculationStrategy = new FeeCalculationStrategyForAdults();