Looking for MXFGE2IN01 Conception Programmation Objet 1 (2024-2025) test answers and solutions? Browse our comprehensive collection of verified answers for MXFGE2IN01 Conception Programmation Objet 1 (2024-2025) at moodle.epf.fr.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Répondez à l'affirmation suivante.Une mauvaise réponse entraine des points négatifs.
" une méthode ayant comme type retour void peut retourner n'importe quel type de variable, y compris des objets."
Auteur : Benoit Darties
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!