comme sur discord

This commit is contained in:
2021-10-06 21:23:51 +02:00
parent 4f2904fc01
commit a2fa7960c3
9 changed files with 495 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
package fr.iutfbleau.projetIHM2021FI2.MNP;
import fr.iutfbleau.projetIHM2021FI2.API.*;
import java.util.*;
/**
* Un client non persistent tout bête
*/
public class ClientNP implements Client {
private int id;
private String nom;
private String prenom;
/**
* Constructeur
*/
public ClientNP(int id, String nom, String prenom){
Objects.requireNonNull(nom,"On ne peut pas créer une personne avec un nom à null.");
Objects.requireNonNull(nom,"On ne peut pas créer une personne avec un prenom à null.");
this.id=id;
this.nom=nom;
this.prenom=prenom;
}
/**
* permet de récupérer l'identifiant du client (qu'on suppose être le même pour les différents systèmes, internes et externes à l'hôtel).
* @return l'identifiant.
*/
public int getId(){
return this.id;
}
/**
* permet de récupérer
* @return le nom du client.
*/
public String getNom(){
return this.nom;
}
/**
* permet de récupérer
* @return le prénom du client
*/
public String getPrenom(){
return this.prenom;
}
}