nom = $nom; $this->prenom = $prenom; $this->age = $age; } public function afficherHtml(){ echo "Etudiant2 :
". "Nom : ".$this->getNom()."
" ."Prenom : ".$this->getPrenom()."
"."Age : ".$this->getAge()."
"; } //accès en écriture (setter) public function setNom($nom){ $this->nom = $nom; } public function setPrenom($prenom){ $this->prenom = $prenom; } public function setAge($age){ $this->age = $age; } public function getNom(){ return $this->nom; } public function getPrenom(){ return $this->prenom; } public function getAge(){ return $this->age; } }