✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
On vous donne la classe suivante :
public class Animal {
private boolean estVegetarien;
private String nourriture;
private int nbPattes;
public Animal(){}
public Animal(boolean veg, String nourrit, int nbP){
this.estVegetarien = veg;
this.nourriture = nourrit;
this.nbPattes = nbP;
}
public boolean estVegetarien() {
return estVegetarien;
}
public void definirVegetarien(boolean veg) {
this.estVegetarien = veg;
}
public String lireNourriture() {
return nourriture;
}
public void definirNourriture(String nourrit) {
this.nourriture = nourrit;
}
}
Auteur : Benoit Darties
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!