Corrigedevoir 2019 package dev import java util Scanner public class Chanson private String titre private String chanteur private String compositeur private int duree public Chanson String titre String chanteur this titre titre this chanteur chanteur comp

package dev import java util Scanner public class Chanson private String titre private String chanteur private String compositeur private int duree public Chanson String titre String chanteur this titre titre this chanteur chanteur compositeur null duree public Chanson titre null chanteur null compositeur null duree public void saisir Scanner s new Scanner System in titre s nextLine chanteur s next compositeur s next duree s nextInt Cpublic String getTitre return titre public String getCompositeur return compositeur public void setDuree int duree this duree duree public int getDuree return duree public void ecouterChanson for int i iPLAY private ?nal int NBCHANSMAXI private ?nal int NBCHANS MAXI private String titreAlbum Cprivate int typeAlbum private Chanson chanson private int nbChanson public Album String titre int typeAlbum this titreAlbum titre if typeAlbum SINGLE chanson new Chanson NBCHANSMAXI else if typeAlbum LONGPLAY chanson new Chanson NBCHANS MAXI public void ajouter Chanson c if nbChanson Cval i i return val public void supprimerChanson String titre boolean trouve false int i int val - while i Cal ajouter ch int i al rechercherChanson la bohème if i - al supprimerChanson la bohème al lireAlbum C

  • 30
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise
Partager