Compare commits
3 Commits
b854ed53f4
...
43cbdc54de
Author | SHA1 | Date | |
---|---|---|---|
|
43cbdc54de | ||
|
2f47f5aa52 | ||
|
427b1e0887 |
@ -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