import métiers.Commande; import métiers.Entreprise; import métiers.Instrument; /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template */ /** * * @author sio */ public class Test { /** * @param args the command line arguments */ public static void main(String[] args) { Entreprise lEntreprise=new Entreprise("MusicAndCo"); Instrument instr1=new Instrument(1,"Piano",10, 8300f); Instrument instr2=new Instrument(2,"Violon",9, 105f); Instrument instr3=new Instrument(3,"Guitare",8, 575f); Commande laCommande = new Commande(1,1,"12/09/2024"); lEntreprise.ajouterCommande(laCommande); //Test Cas0-Ajouter à la commande une ligne de 2 instr1 System.out.println("Résultat de l'ajout de 2 instr1 à la commande :" + laCommande.ajouter(instr1, 2) ); System.out.println("Nouveau stock de instr1 : "+instr1.getQteStock()); System.out.println("Quantité de la ligne de commande de instr1 :"+laCommande.getLesLignes().get(instr1)); } }