public String listeDesParticipants() { if (unSeulParticipant != null) { return unSeulParticipant.toString(); } else { return "aucun participant affecté à ce cours"; } }
public String toString() { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); StringBuilder sb = new StringBuilder("=>").append(intituleCours).append(" le"); sb.append(sdf.format(getDateCours())).append(" a ").append(heureCours).append("h - maximum\n"); sb.append("Moniteur : ").append(leMoniteur.toString()).append("\n"); // if (unSeulParticipant != null) { // sb.append("Participant : ").append(unSeulParticipant.toString()).append("\n"); // } return sb.toString(); }
public void supprimerParticipant(Participant unP) { if (unSeulParticipant != null && unSeulParticipant.toString().equalsIgnoreCase(unP.toString())) { unSeulParticipant = null; } }