bonjour,

je voulais avoir une idée de la part des gens connaisseur du domaine , voila le prof nous a donnée un travail de professionnelle pour des adulte qui commence dans les cours , toutes la classe bloquée plus les cours a distance s'aide pas a comprendre de plus lui même tâtonne il fait des programme qui marche pas mais bbon j'ai besoin de votre aide sur cette énoncé svp . merci

Nom : Capture1.PNG
Affichages : 430
Taille : 104,2 KoNom : Capture2.PNG
Affichages : 379
Taille : 132,7 KoNom : Capture3.PNG
Affichages : 401
Taille : 135,6 KoNom : Capture4.PNG
Affichages : 392
Taille : 73,9 Ko
Cie_Air_Relax.txt
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
64
65
 
public class Vol {
 
 private static int nombreVols=0;
   public String dateDepart;
   private int numeroVol;
   private String destVol;
   private int nbTotalReservation;  
 
 
 
		public Vol(int numeroVol, String destVol, String dateDepart, int nbTotalReservation  ) {
 
			   this.numeroVol = numeroVol;
			   this.destVol = destVol;
			   this.dateDepart = dateDepart;
			   this.nbTotalReservation =nbTotalReservation;
			   nbTotalReservation++;
		}
 
 
 
 
 
	   public static int getNombreVols() {
		return nombreVols;
	}
 
 
	public String getDateDepart() {
		return dateDepart;
	}
 
 
	public int getNumeroVol() {
		return numeroVol;
	}
 
 
	public String getDestVol() {
		return destVol;
	}
 
 
	public  int getNbTotalReservation() {
		return nbTotalReservation;
	}
 
 
 
 
 
	public void setDateDepart(String dateDepart) {
		this.dateDepart = dateDepart;
	}
 
 
 
 
 
	public  void setNbTotalReservation(int nbTotalReservation) {
		this.nbTotalReservation = nbTotalReservation;
	}
 
}
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
public  class Date {
 
   private int jour, mois, annee;
 
   public Date(int jour, int mois, int annee) throws Exception{
      this.jour = jour;
      this.mois = mois;
      this.annee = annee;
 
   }
 
        public int getJour() {
	return jour;
      }
 
      public void setJour(int jour) {
	      this.jour = jour;
       }
 
     public int getMois() {
	  return mois;
          }
 
           public void setMois(int mois) {
	          this.mois = mois;
       }
 
       public int getAnnee() {
	return annee;
        }
 
          public void setAnnee(int annee) {
	         this.annee = annee;
              }
 
          public boolean estBissextile(){
      return (annee%4==0 && annee%100!=0) || annee%400==0;
     }
 
   public boolean equals(Object o){
      if( o instanceof Date){
         Date d = (Date) o;
         return jour == d.jour&& mois == d.mois && annee == d.annee;
      }else return false;
      }
 
@Override
public String toString() {
	return "Date [jour=" + jour +"/"+ ", mois=" + mois + "/"+ ", annee=" + annee + "]";
}
}
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 
public class GestionVol {
 
	static BufferedWriter tEcrire;
	static BufferedReader tLire; 
 
	static JTextArea sortie = new JTextArea(10, 30);
 
	final public int MAX_PLACES = 340 ;
	static ArrayList<Vol> tabVol= new ArrayList<Vol>();
 
		public static int menu() {
 
			 int choix;
 
			    String contenu="\n***** GESTION DES VOLS *****";
			    contenu+="\n1-Liste des vols  ";
			    contenu+="\n2-Ajout d'un vol ";
			    contenu+="\n3-Retrait d'un vol ";
			    contenu+="\n4-Modification de la date du départ";
			    contenu+="\n5-Réservation d'un vol";
			    contenu+="\n6-Terminer";
			    contenu+="\n\nFaite votre choix : ";
			    choix=Integer.parseInt(JOptionPane.showInputDialog(null, contenu,
						"CIE AIR RELAXE", JOptionPane.PLAIN_MESSAGE));
			    return choix;
			}
 
		public static void chargerVols () throws IOException {
			tLire= new BufferedReader(new FileReader("src/Cie_Air_Relax.txt"));
			String tab[] = new String[3];
			String ligne;
			while ((ligne=tLire.readLine())!=null) {
				tab=ligne.split(":");
				tabVol.add(new Vol( Integer.parseInt(tab[0]),tab[1], tab[2], Integer.parseInt(tab[3]))); 
			}
 
		}
 
		public static void sauvegarderVol() throws IOException {
 
			 tEcrire = new BufferedWriter(new FileWriter("src/Cie_Air_Relax.txt"));
			String ligneEcrire="";
			for (Vol unVol : tabVol) {
				ligneEcrire=unVol.getNumeroVol()+":"+unVol.getDestVol()+":"+unVol.getDateDepart()+":"
			+unVol.getNbTotalReservation();
				tEcrire.write(ligneEcrire);
				tEcrire.newLine();//Passer à la ligne suivante dans le fichier
			}
			tEcrire.close();
		}
               public static void  Listvols ()throws IOException {
 
 
       		}
 
 
 
               public static void   insererVol()throws IOException {
 
            	   int Nvol =0;
 
 
            	   Nvol = Integer.parseInt(JOptionPane.showInputDialog("Numéro du vol "));
 
 
       		}	
 
               public static void  Retrait ()throws IOException {
 
          		}	
 
               public static void  Modification ()throws IOException {
 
         		}	
 
               public static void  Résarvation ()throws IOException {
 
        		}	
 
 
 
			public static void main(String[] args)  throws IOException {
 
				int choixUtilisateur;
 
				    do{
				        choixUtilisateur=menu();
 
				        switch(choixUtilisateur){
				            case 1 :
 
				            Listvols();
				            break;
				            case 2 :
				            insererVol();
				            break;
 
				            case 3 :
				                Retrait();
				            break;
 
				            case 4 :
				                Modification();
				            break;
 
				            case 5 :
				                Résarvation();
				            break;
 
				            case 6 :
				            	JOptionPane.showMessageDialog(null, "\nMERCI D'AVOIR UTILISÉ NOTRE PROGRAMME.");
				            break;
				            default:
				            	System.out.println("\nVotre choix est invalide");
				        }
 
				    }while(choixUtilisateur!=6);
 
 
	}
 
}