From 43108907a3af8094cfe880b9d10f7ec036ab33ff3bca1c96af021c159ab37bcd Mon Sep 17 00:00:00 2001 From: BRAMAS Arthur Date: Mon, 29 Sep 2025 12:06:38 +0200 Subject: [PATCH] =?UTF-8?q?commit=20classe=20=C3=A9tudiant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Etudiant.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ script1.php | 5 +++++ 2 files changed, 52 insertions(+) create mode 100644 Etudiant.php diff --git a/Etudiant.php b/Etudiant.php new file mode 100644 index 0000000..e6b8660 --- /dev/null +++ b/Etudiant.php @@ -0,0 +1,47 @@ +nom = $Nom; + $this->prenom = $Prenom; + $this->age = $Age; + } + + public function getNom() { + return $this->nom; + } + + public function setNom($Nom) { + $this->nom = $Nom; + } + + public function getPrenom() { + return $this->prenom; + } + + public function setPrenom($Prenom) { + $this->prenom = $Prenom; + } + + public function getAge() { + return $this->age; + } + + public function setAge($Age) { + $this->age = $Age; + } + + public function getEtudiant() { + "
"; + echo"infos étudiant : "."
"; + echo"prenom étudiant : ".$this->getPrenom()."
"; + echo"nom étudiant : ".$this->getNom()."
"; + echo"age étudiant : ".$this->getAge()."
"; + + } + + } \ No newline at end of file diff --git a/script1.php b/script1.php index b4f55d4..d6a001c 100644 --- a/script1.php +++ b/script1.php @@ -1,5 +1,10 @@ "; + $etudiant1 = new Etudiant("test","test",8); + + echo $etudiant1->getEtudiant(); + \ No newline at end of file