From 897fb7b8cbabd686ef3f734ca93ac727242aaf5b Mon Sep 17 00:00:00 2001 From: Jose Srifi Date: Fri, 29 Mar 2019 10:29:49 +0100 Subject: [PATCH] ajout du X.java --- X.java | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 X.java diff --git a/X.java b/X.java new file mode 100644 index 0000000..3792b30 --- /dev/null +++ b/X.java @@ -0,0 +1,36 @@ +public class X { + private String nom; + private String prenom; + + + public X() { + this.nom = null; + this.preom = null; + } + + public X(String s1, String s2) { + this.nom = s1; + this.prenom = s2; + } + + public getNom() { + return this.nom; + } + + public getPrenom() { + return this.prenom; + } + + public setNom(String s) { + this.nom = s; + } + + public setPrenom(Sting s) { + this.prenom = s; + } + + @Override + public String toString() { + return "La personne s'appelle " + this.prenom + " " + this.nom; + } +}