modif classe entreprise
This commit is contained in:
parent
9a0b3f147b
commit
427b1e0887
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
#pour netbeans
|
||||
Libraries/*
|
||||
Test Libraries/*
|
||||
/nbproject/private/
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
package métiers;
|
||||
|
||||
import métiers.Commande;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -12,6 +12,8 @@ import métiers.Commande;
|
||||
*/
|
||||
public class Entreprise {
|
||||
private String raisonSociale;
|
||||
private ArrayList<Commande> lesCommandes = new ArrayList<>();
|
||||
private ArrayList<Instrument> lesInstruments = new ArrayList<>();
|
||||
|
||||
public Entreprise(String raisonSociale) {
|
||||
this.raisonSociale = raisonSociale;
|
||||
@ -32,12 +34,21 @@ public class Entreprise {
|
||||
|
||||
|
||||
public void ajouterCommande(Commande uneCommande){
|
||||
lesCommandes.add(uneCommande);
|
||||
}
|
||||
|
||||
public void supprimerCommande(Commande uneCommande){
|
||||
lesCommandes.remove(uneCommande);
|
||||
}
|
||||
|
||||
public Commande rechercherCommande(int noCom){
|
||||
Commande laCommande=null;
|
||||
return laCommande;
|
||||
Commande uneCommande = null;
|
||||
for(Commande laCommande : lesCommandes){
|
||||
if(laCommande.noCom == noCom){
|
||||
uneCommande = laCommande;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return uneCommande;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user