X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=TD3%2Fhotel%2FInfos.java;fp=TD3%2Fhotel%2FInfos.java;h=3c881c05971f6075aac24ef5ee58ac457d242146;hb=3a8c8f1926734c79be64af8debbc807ee2eabb5e;hp=0000000000000000000000000000000000000000;hpb=ae09e645684a4f53aad5566f811ab7e99d6b68ac;p=TD_SR.git diff --git a/TD3/hotel/Infos.java b/TD3/hotel/Infos.java new file mode 100644 index 0000000..3c881c0 --- /dev/null +++ b/TD3/hotel/Infos.java @@ -0,0 +1,77 @@ +package hotel; + +import java.io.Serializable; + + +/** + * Applications reparties + * TP - Exercice + * Chaine d'hotels + * + * Classe regroupant les informations d'une reservation + * + * @author Toto + * @version 1.0 + */ +public class Infos implements Serializable { + + private static final long serialVersionUID = -6199402168457446943L; + + private String nomClient; + private String nomHotel; + private String date; + private int nbchambres; + + public Infos() { + this.nomClient = ""; + this.nomHotel = ""; + this.date = ""; + this.nbchambres = 0; + } + + public Infos(String client, String hotel, String date, int nb) { + this.nomClient = client; + this.nomHotel = hotel; + this.date = date; + this.nbchambres = nb; + } + + public String getNomClient() { + return this.nomClient; + } + + public void setNomClient(String nom) { + this.nomClient = nom; + } + + public String getNomHotel() { + return this.nomHotel; + } + + public void setNomHotel(String nom) { + this.nomHotel = nom; + } + + public String getDate() { + return this.date; + } + + public void setDate(String d) { + this.date = d; + } + + public int getNbChambres() { + return this.nbchambres; + } + + public void setNbChambres(int nb) { + this.nbchambres = nb; + } + + public String toString() { + String str = ""; + str = str + this.nomClient + " " + this.nomHotel + " " + this.date + " " + this.nbchambres; + return str; + } + +}