second commit
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
@@ -8,4 +8,6 @@ traitementPrive();
|
|||||||
|
|
||||||
|
|
||||||
$etu1 = new Etudiant();
|
$etu1 = new Etudiant();
|
||||||
$etu1->nom ="Durand";
|
$etu1->setNom("Durand");
|
||||||
|
|
||||||
|
echo "Nom de l'étudiant :".$etu1->getNom();
|
||||||
|
Reference in New Issue
Block a user