1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| import java.util.Scanner;
public class Exercie{
public static void main(String[] args) {
Footballeur [] tab1;
Footballeur [] tab2;
Equipe e1=new Equipe("Fc barcelone","rouge");
Equipe e2=new Equipe("Real madrid","Blanc");
for(int i=0;i<=11;i++){
Scanner sc = new Scanner(System.in);
System.out.println("Veuillez saisir un nom de footballeur de l'equipe invitante :");
String str = sc.nextLine();
Footballeur f1=new Footballeur(str);
e1.ajoutJoueur(f1);
}
for(int j=0;j<=11;j++){
Scanner sc = new Scanner(System.in);
System.out.println("Veuillez saisir un nom de footballeur de l'equipe invitée :");
String str = sc.nextLine();
Footballeur f1=new Footballeur(str);
e2.ajoutJoueur(f1);
}
Match m1=new Match(e1,e2);
tab1=e1.getTabJoueurs();
tab2=e2.getTabJoueurs();
e1.setTabJoueurs(tab1);
tab1[6].marquerUnBut();
e2.setTabJoueurs(tab2);
tab2[2].encaisserUnCartonJaune();
tab2[2].encaisserUnCartonJaune();
m1.retournerGagnant();
}
} |
Partager