Resolution 110550
Resolution 110550
Resolution 110550
O
Question 1. A.
} this.montre = montre;
} }
personne1.porterMontre(montre1);
System.out.println("Montre 1 : " +
montre1); personne2.porterMontre(montre2);
}
Personne personne1 = new
Personne("Alice");
QUESTION 1.B
} System.out.println("Heure de la personne 2
après avoir avancé: " + personne2.getMontre());
public class Main {
}
public static void main(String[] args) {
}
Montre montre1 = new Montre(10, 30);
QUESTION 2. A.
int quantite; }
return ingredients;
choucroute.ajouterIngredient(lardCuitEntier);
}
QUESTION 2.B.
} }
@Override
} @Override
String nom; }
List<Ingredient> ingredients; }
choucroute2.ajouterIngredient(choucrouteCuite2
);
Ingredient choucrouteCuite2 = new
Ingredient("Choucroute", "cuite", 600,
"gramme"); choucroute2.ajouterIngredient(lardCuitEntier2);
choucroute1.ajouterIngredient(choucrouteCuite1 }
);
}
QUESTION 2.C
} }
@Override }