Académique Documents
Professionnel Documents
Culture Documents
Partie 1
public class Question {
this.énoncéQuestion=énoncéQuestion; this.thèmeQuestion=thèmeQuestion;
this.nbRépCorrectes =nbRépCorrectes ;
this.tabRépProposées=new String[3];}
this.tabRépProposées=tab;}
public String toString(){
String str="";
return Q1.estIdentique(Q2) ;}
{return this.thèmeQuestion;}}
Partie II
public class QuestionRépUnique extends Question{
{super(énoncéQuestion, thèmeQuestion,1);}
1
public void setRepCorrecte( String repCorrecte) {this.repCorrecte= repCorrecte;}
int i=0;
i++;
return i+1;
import java.util.Scanner;
this.thèmeQCM= thèmeQCM;
{this.tabQuestions[this.nbQuestions]=Q; this.nbQuestions++;}}
int nbcorrecte=0;
int numréponse;
for(int i=0;i<this.nbQuestions;i++)
{ System.out.println(this.tabQuestions[i].toString());
numréponse=S.nextInt();
return nbcorrecte;}}
2
public class Test {
Q1.setRepCorrecte("compilé et interprété");
Q1.setTabRépProposées(tab1);
Q2.setRepCorrecte("JVM");
Q2.setTabRépProposées(tab2);
QCMPOO.ajouterQuestion(Q1);
QCMPOO.ajouterQuestion(Q2);
}}