Compare commits
No commits in common. "43cbdc54defcb2056b6b91c5f1be1183d3a5bc61" and "b854ed53f4a446cb318b81811900788aed51b028" have entirely different histories.
43cbdc54de
...
b854ed53f4
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
package métiers;
|
package métiers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import métiers.Commande;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -12,8 +12,6 @@ import java.util.ArrayList;
|
|||||||
*/
|
*/
|
||||||
public class Entreprise {
|
public class Entreprise {
|
||||||
private String raisonSociale;
|
private String raisonSociale;
|
||||||
private ArrayList<Commande> lesCommandes = new ArrayList<>();
|
|
||||||
private ArrayList<Instrument> lesInstruments = new ArrayList<>();
|
|
||||||
|
|
||||||
public Entreprise(String raisonSociale) {
|
public Entreprise(String raisonSociale) {
|
||||||
this.raisonSociale = raisonSociale;
|
this.raisonSociale = raisonSociale;
|
||||||
@ -34,21 +32,12 @@ public class Entreprise {
|
|||||||
|
|
||||||
|
|
||||||
public void ajouterCommande(Commande uneCommande){
|
public void ajouterCommande(Commande uneCommande){
|
||||||
lesCommandes.add(uneCommande);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void supprimerCommande(Commande uneCommande){
|
public void supprimerCommande(Commande uneCommande){
|
||||||
lesCommandes.remove(uneCommande);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Commande rechercherCommande(int noCom){
|
public Commande rechercherCommande(int noCom){
|
||||||
Commande uneCommande = null;
|
Commande laCommande=null;
|
||||||
for(Commande laCommande : lesCommandes){
|
return laCommande;
|
||||||
if(laCommande.noCom == noCom){
|
|
||||||
uneCommande = laCommande;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return uneCommande;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user