ynh_extension_meeo/libs/bulletin/Note.lib.php
2024-09-11 09:27:45 +02:00

37 lines
No EOL
652 B
PHP

<?php
namespace YesWiki\Meeo\Bulletin;
class Note {
private $intitule;
private $note;
private $coef;
private $max;
public function __construct(string $intitule, int $note, int $max, float $coef = 1.0) {
$this->intitule = $intitule;
$this->note = $note;
$this->coef = $coef;
$this->max = $max;
}
public function getIntitule() {
return $this->intitule;
}
public function getNote() {
return $this->note;
}
public function getNoteOn20() {
return ($this->note / $this->max) * 20;
}
public function getCoef() {
return $this->coef;
}
public function getMax() {
return $this->max;
}
}