47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
class Etudiant {
|
|
private $nom;
|
|
private $prenom;
|
|
private $age;
|
|
|
|
public function __construct(String $Nom, String $Prenom, int $Age) {
|
|
$this->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() {
|
|
"<br/>";
|
|
echo"infos étudiant : "."<br/>";
|
|
echo"prenom étudiant : ".$this->getPrenom()."<br/>";
|
|
echo"nom étudiant : ".$this->getNom()."<br/>";
|
|
echo"age étudiant : ".$this->getAge()."<br/>";
|
|
|
|
}
|
|
|
|
} |