second commit

This commit is contained in:
psfroad
2025-09-29 11:37:23 +02:00
parent 98789a070a
commit f7638c868c
2 changed files with 7 additions and 1 deletions

View File

@@ -7,4 +7,8 @@ class Etudiant{
public function setNom($n){ public function setNom($n){
$this->nom = $n; $this->nom = $n;
} }
public function getNom(){
return $this->nom;
}
} }

View File

@@ -8,4 +8,6 @@ traitementPrive();
$etu1 = new Etudiant(); $etu1 = new Etudiant();
$etu1->nom ="Durand"; $etu1->setNom("Durand");
echo "Nom de l'étudiant :".$etu1->getNom();