123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package Modele;
-
- public class Question
- {
- protected String intitule;
- protected String reponse1;
- protected String reponse2;
- protected int reponse;
-
- public Question(String intitule, String reponse1, String reponse2, int reponse) {
- this.intitule = intitule;
- this.reponse1 = reponse1;
- this.reponse2 = reponse2;
- this.reponse = reponse;
- }
-
- public String getIntitule() {
- return intitule;
- }
-
- public void setIntitule(String intitule) {
- this.intitule = intitule;
- }
-
- public String getReponse1() {
- return reponse1;
- }
-
- public void setReponse1(String reponse1) {
- this.reponse1 = reponse1;
- }
-
- public String getReponse2() {
- return reponse2;
- }
-
- public void setReponse2(String reponse2) {
- this.reponse2 = reponse2;
- }
-
- public int getReponse() {
- return reponse;
- }
-
- public void setReponse(int reponse) {
- this.reponse = reponse;
- }
-
- public String toString() {
- String bonneReponse = new String();
- if(reponse == 0)
- {
- bonneReponse = "Les deux";
- }
- else if(reponse == 1)
- {
- bonneReponse = reponse1;
- }
- else
- {
- bonneReponse = reponse2;
- }
-
- return intitule + " | " + bonneReponse;
- }
- }
|