logo

Crowdly

160-4-12 - Programmation objet - avancé

Looking for 160-4-12 - Programmation objet - avancé test answers and solutions? Browse our comprehensive collection of verified answers for 160-4-12 - Programmation objet - avancé at moodle.univ-lr.fr.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Soit la classe Statique2 suivante :

public class Statique2 {

private static int a = 0;

private int b;

public Statique2(int valB) {

a++;

this.b = valB;

}

public static int test() {

return this.a + b;

}

public int getB() {

return this.b;

}

}

Cette classe se compile-t-elle correctement ?...

View this question

Soit la classe Statique1 :

public class Statique1 {

private static int a = 0;

private int b;

public Statique1(int valB) {

a++;

this.b = valB;

}

public static int getA() {

return a;

}

public int getB() {

return this.b;

}

public static void main(String[] args) {

Statique1 s1 = new Statique1(1);

Statique1 s2 = new Statique1(2);

System.out.println("valeur 1 = " + Statique1.getA());

System.out.println("valeur 2 = " + s2.getB());

}

}

Compléter les valeurs affichées...

View this question

Soit la classe CompteBancaire :

public class CompteBancaire {

private String nomFamille;

private String[] prenoms;

public float solde;

}

Quelles sont les affirmations correctes vis à vis de cette classe ?

View this question

Want instant access to all verified answers on moodle.univ-lr.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!