import java.util.Date;

import javax.swing.JOptionPane;

public class Session {
	private Date debut;
	private Date fin;
	private String libelle;
	
//---------- Constructeur ------------ //
	
	public Session(Date deb, Date finn){
		this.debut = deb;
		this.fin = finn;
	}

	/*
	public Session(){
		this.debut = ;
		this.fin = ;
	}
	*/
//---------- Getters & Setters ------------- //
	public Date getDebut() {
		return debut;
	}


	public void setDebut(Date debut) {
		this.debut = debut;
	}


	public Date getFin() {
		return fin;
	}


	public void setFin(Date fin) {
		this.fin = fin;
	}


	public String getLibelle() {
		return libelle;
	}


	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
	
	// --------------------------------//
	
	public String toString(){
		return getLibelle();
	}
	
	public String titreSession(){
		String title = JOptionPane.showInputDialog(null, "Entrez le nom de votre session", "Titre", JOptionPane.QUESTION_MESSAGE);
		this.setLibelle(title);
		return this.toString();
	}
}
