Init de mon dépôt
This commit is contained in:
BIN
Act2 Vincent.zip
Normal file
BIN
Act2 Vincent.zip
Normal file
Binary file not shown.
31
pakeje/Amphi.java
Normal file
31
pakeje/Amphi.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package pakeje;
|
||||
|
||||
public class Amphi extends Salle {
|
||||
|
||||
private int hauteurSousPlafond;
|
||||
|
||||
public Amphi() {
|
||||
super();
|
||||
hauteurSousPlafond = 0;
|
||||
}
|
||||
|
||||
public Amphi(int hsp) {
|
||||
super();
|
||||
hauteurSousPlafond = hsp;
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println("Amphi :");
|
||||
super.afficherInfos();
|
||||
System.out.println("Hauteur sous plafond : " + hauteurSousPlafond);
|
||||
}
|
||||
|
||||
public int getHauteurSousPlafond() {
|
||||
return hauteurSousPlafond;
|
||||
}
|
||||
|
||||
public void setHauteurSousPlafond(int hauteurSousPlafond) {
|
||||
this.hauteurSousPlafond = hauteurSousPlafond;
|
||||
}
|
||||
|
||||
}
|
4118
pakeje/AppOuvertures.java
Normal file
4118
pakeje/AppOuvertures.java
Normal file
File diff suppressed because it is too large
Load Diff
40
pakeje/Batiment.java
Normal file
40
pakeje/Batiment.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package pakeje;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Batiment {
|
||||
|
||||
private String nom;
|
||||
private ArrayList<Salle> listeSalles;
|
||||
|
||||
|
||||
public Batiment() {
|
||||
nom = "/";
|
||||
}
|
||||
public Batiment(String n) {
|
||||
nom = n;
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println( "Nom du bat " + nom);
|
||||
System.out.println( " Liste des salles du bat :");
|
||||
for ( Salle s : listeSalles) {
|
||||
s.afficherInfos();
|
||||
}
|
||||
}
|
||||
|
||||
public void ajouterSalle(Salle s) {
|
||||
listeSalles.add(s);
|
||||
}
|
||||
public void retirerSalle(Salle s) {
|
||||
listeSalles.remove(s);
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
}
|
35
pakeje/Fenetre.java
Normal file
35
pakeje/Fenetre.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package pakeje;
|
||||
|
||||
public class Fenetre extends Ouverture {
|
||||
|
||||
private boolean doubleVitrage;
|
||||
|
||||
public Fenetre () {
|
||||
super();
|
||||
System.out.println("Constructeur par défault de Fenetre");
|
||||
doubleVitrage = false;
|
||||
}
|
||||
|
||||
public Fenetre (int lg, String ns, boolean dv) {
|
||||
super(lg, ns);
|
||||
doubleVitrage = dv ;
|
||||
}
|
||||
|
||||
public void aDoubleVitrage() {
|
||||
if ( doubleVitrage ) {
|
||||
System.out.println(" Il y a bien du fameux double vitrage !");
|
||||
}
|
||||
else {
|
||||
System.out.println(" Il n'y as malheureusement pas de double vitrage :') ");
|
||||
}
|
||||
}
|
||||
public void afficherInfos() {
|
||||
super.afficherInfos();
|
||||
System.out.println("Type : fenêtre");
|
||||
aDoubleVitrage();
|
||||
}
|
||||
|
||||
public void setDoubleVitrage(boolean doubleVitrage) {
|
||||
this.doubleVitrage = doubleVitrage;
|
||||
}
|
||||
}
|
13
pakeje/GestionTravaux.java
Normal file
13
pakeje/GestionTravaux.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package pakeje;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GestionTravaux {
|
||||
public ArrayList<Batiment> listeBatiment;
|
||||
public ArrayList<Technicien> listeTechnicien;
|
||||
|
||||
public GestionTravaux() {
|
||||
|
||||
}
|
||||
|
||||
}
|
39
pakeje/Ouverture.java
Normal file
39
pakeje/Ouverture.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package pakeje;
|
||||
|
||||
public class Ouverture {
|
||||
|
||||
private int largeur;
|
||||
private String numeroSerie;
|
||||
|
||||
public Ouverture () {
|
||||
System.out.println("Constructeur par défault d'Ouvertures");
|
||||
largeur = 0;
|
||||
numeroSerie = "non défini";
|
||||
}
|
||||
|
||||
public Ouverture (int lg, String ns) {
|
||||
largeur = lg;
|
||||
numeroSerie = ns;
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println("Ouverture : numero de serie " + numeroSerie + " , largeur = " + largeur);
|
||||
}
|
||||
|
||||
|
||||
public int getLargeur() {
|
||||
return largeur;
|
||||
}
|
||||
|
||||
public void setLargeur(int largeur) {
|
||||
this.largeur = largeur;
|
||||
}
|
||||
|
||||
public String getNumeroSerie() {
|
||||
return numeroSerie;
|
||||
}
|
||||
|
||||
public void setNumeroSerie(String numeroSerie) {
|
||||
this.numeroSerie = numeroSerie;
|
||||
}
|
||||
}
|
29
pakeje/Responsable.java
Normal file
29
pakeje/Responsable.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package pakeje;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Responsable extends Technicien {
|
||||
private ArrayList<Technicien> listeSupervisions;
|
||||
|
||||
public Responsable() {
|
||||
super();
|
||||
listeSupervisions = new ArrayList<>();
|
||||
}
|
||||
|
||||
public Responsable(String n, int ae) {
|
||||
super(n, ae);
|
||||
listeSupervisions = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println("~~~~~~~~~~~~~~~ Responsable ~~~~~~~~~~~~~~~");
|
||||
System.out.println(" Nom : " + getNom());
|
||||
System.out.println(" Années d'xp : " + getAnneesExperience());
|
||||
System.out.println(" Nombre de supervisions : " + listeSupervisions);
|
||||
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
}
|
||||
|
||||
public void ajouterSupervisionBenite(Technicien supervisions) {
|
||||
listeSupervisions.add(supervisions);
|
||||
}
|
||||
}
|
40
pakeje/Salle.java
Normal file
40
pakeje/Salle.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package pakeje;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Salle {
|
||||
|
||||
private int numero;
|
||||
private ArrayList<Ouverture> listeOuvertures = new ArrayList<Ouverture>();
|
||||
|
||||
public Salle () {
|
||||
this.numero = 0;
|
||||
}
|
||||
|
||||
public Salle (int n) {
|
||||
numero = n;
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println("Salle numero :" + numero );
|
||||
for ( Ouverture ouvertureCourante : listeOuvertures) {
|
||||
ouvertureCourante.afficherInfos();
|
||||
}
|
||||
}
|
||||
|
||||
public void ajouterOuvertures(Ouverture ouv) {
|
||||
listeOuvertures.add(ouv);
|
||||
}
|
||||
public void retirerOuvertures(Ouverture ouv) {
|
||||
listeOuvertures.remove(ouv);
|
||||
}
|
||||
|
||||
public int getNumero() {
|
||||
return numero;
|
||||
}
|
||||
|
||||
public void setNumero(int numero) {
|
||||
this.numero = numero;
|
||||
}
|
||||
|
||||
}
|
52
pakeje/Technicien.java
Normal file
52
pakeje/Technicien.java
Normal file
@@ -0,0 +1,52 @@
|
||||
package pakeje;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Technicien {
|
||||
|
||||
private String nom;
|
||||
private int anneesExperience;
|
||||
private ArrayList<Ouverture> listeOuvertures;
|
||||
|
||||
public Technicien() {
|
||||
System.out.println("Constructeur par défault de Technicien");
|
||||
this.nom = "/";
|
||||
this.anneesExperience = 0;
|
||||
}
|
||||
|
||||
public Technicien(String n, int ae) {
|
||||
this();
|
||||
this.nom = n;
|
||||
this.anneesExperience = ae;
|
||||
}
|
||||
|
||||
public void afficherInfos() {
|
||||
System.out.println("~~~~~~~~~~~~~~~ Technicien ~~~~~~~~~~~~~~~");
|
||||
System.out.println(" Nom : " + nom);
|
||||
System.out.println(" Années d'xp : " + anneesExperience);
|
||||
System.out.println(" Nombre d'ouvertures posées : " + listeOuvertures.size());
|
||||
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
}
|
||||
|
||||
public void ajouterOuvertureBenite(Ouverture ouvertureBenite) {
|
||||
listeOuvertures.add(ouvertureBenite);
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
public int getAnneesExperience() {
|
||||
return anneesExperience;
|
||||
}
|
||||
public void setAnneesExperience(int anneesExperience) {
|
||||
this.anneesExperience = anneesExperience;
|
||||
}
|
||||
|
||||
public ArrayList<Ouverture> getListeOuvertures() {
|
||||
return listeOuvertures;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user