<?php
namespace App\Entity\Formation;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\Formation\ParticipantRepository;
use App\Traits\Actions;
use App\Entity\User;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
#[ORM\Entity(repositoryClass: ParticipantRepository::class)]
#[ORM\Table(name: 'hs_tc_formation_participant')]
#[ApiResource]
class Participant implements \Stringable
{
use Actions;
final public const SERVER_PATH_TO_IMAGE_FOLDER = 'uploads/images/participant';
#[ORM\OneToOne(inversedBy: "participant", targetEntity: User::class, cascade: ["persist"])]
#[ORM\JoinColumn(nullable: true)]
private ?User $user = null;
#[ORM\ManyToOne(targetEntity: "Classe", inversedBy: "participants")]
#[ORM\JoinColumn(nullable: true)]
private ?Classe $classe = null;
#[ORM\Column(name: "first_name", type: "string", length: 255)]
private $firstName;
#[ORM\Column(name: "last_name", type: "string", length: 255)]
private $lastName;
#[ORM\Column(name: "first_name_ar", type: "string", length: 255, nullable: true)]
private ?string $firstNameAr = null;
#[ORM\Column(name: "last_name_ar", type: "string", length: 255, nullable: true)]
private ?string $lastNameAr = null;
#[ORM\Column(name: "cin", type: "string", length: 255, nullable: true)]
private $cin;
#[ORM\Column(name: "gender", type: "string", length: 255, nullable: true)]
private $gender;
#[ORM\Column(name: "birth_in", type: "string", length: 255, nullable: true)]
private $birthIn;
#[ORM\Column(name: "birth_in_ar", type: "string", length: 255, nullable: true)]
private ?string $birthInAr = null;
#[ORM\Column(name: "birth_at", type: "datetime", nullable: true)]
private $birthAt;
#[ORM\Column(name: "nationality", type: "string", length: 255, nullable: true)]
private string $nationality = "Marocaine";
#[ORM\Column(name: "phone", type: "string", length: 255, nullable: true)]
private $phone;
#[ORM\Column(name: "phone2", type: "string", length: 255, nullable: true)]
private $phone2;
#[ORM\Column(name: 'wp', type: 'string', length: 255, nullable: true)]
private ?string $wp = null;
#[ORM\Column(name: "email", type: "string", length: 255, nullable: true)]
private $email;
#[ORM\Column(name: "address", type: "string", length: 255, nullable: true)]
private $address;
#[ORM\Column(name: "address_ar", type: "string", length: 255, nullable: true)]
private ?string $addressAr = null;
#[ORM\Column(name: "city", type: "string", length: 255, nullable: true)]
private $city;
#[ORM\Column(name: "school_level", type: "string", length: 255, nullable: true)]
private $schoolLevel;
#[ORM\Column(name: "school_last", type: "string", length: 255, nullable: true)]
private $schoolLast;
#[ORM\Column(name: "registration_number", type: "string", length: 255, nullable: true)]
private $regNumber;
#[ORM\Column(name: "serie_number", type: "string", length: 255, nullable: true)]
private ?string $serieNumber = null;
#[ORM\Column(name: "id_massar", type: "string", length: 255, nullable: true)]
private ?string $idMassar = null;
#[ORM\Column(name: "diplome_number", type: "string", length: 255, nullable: true)]
private ?string $diplomeNumber = null;
#[ORM\Column(name:"registration_at", type:"datetime", nullable:true)]
private \DateTime $registrationAt;
#[ORM\Column(name: "status", type: "string", length: 255, nullable: true)]
private $status;
#[ORM\Column(name: "status_at", type: "datetime", nullable: true)]
private ?\DateTime $statusAt = null;
#[ORM\Column(name: "image_name", type: "string", length: 255, nullable: true)]
protected $imageName = 'photo.jpg';
protected $imageFile;
#[ORM\Column(name: "cin_image", type: "string", length: 255, nullable: true)]
protected $cinImage = 'cin.png';
protected $cinImageFile;
#[ORM\Column(name: "school_level_image", type: "string", length: 255, nullable: true)]
protected $schoolLevelImage = 'attestation.png';
protected $schoolLevelImageFile;
#[ORM\Column(name: "monthly_payment", type: "float", nullable: true)]
private ?float $monthlyPayment = null;
#[ORM\Column(name: "register_costs", type: "float", nullable: true)]
private ?float $registerCosts = null;
#[ORM\Column(name: "other_costs", type: "string", nullable: true)]
private ?string $otherCosts = null;
#[ORM\Column(name: "diploma_costs", type: "float", nullable: true)]
private ?float $diplomaCosts = null;
#[ORM\Column(name: "discount", type: "boolean")]
private $discount;
#[ORM\OneToMany(mappedBy: "participant", targetEntity: Apayment::class)]
#[ORM\OrderBy(["createAt" => "ASC"])]
private ?Collection $payments = null;
#[ORM\OneToMany(mappedBy: "participant", targetEntity: "Cost", cascade: ["persist"], orphanRemoval: true)]
#[ORM\OrderBy(["datePaie" => "ASC"])]
private ?Collection $costs = null;
#[ORM\OneToMany(mappedBy: "participant", targetEntity: Aabsence::class, cascade: ["persist"], orphanRemoval: true)]
private ?Collection $aabsences = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $plainPassword = null;
#[ORM\Column(name: "training_duration", type: "string", length: 255, nullable: true)]
private ?string $trainingDuration = null;
public function __construct()
{
// date_default_timezone_set('Africa/Casablanca');
$this->createAt=new \DateTime('now');
$this->registrationAt=new \DateTime('now');
$this->published=true;
$this->payments=new ArrayCollection();
$this->discount=false;
$this->wp="212";
}
/**
* Set user
*
*
* @return Participant
*/
public function setUser(User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Set classe
*
*
* @return Participant
*/
public function setClasse(Classe $classe)
{
$this->classe = $classe;
return $this;
}
/**
* Get classe
*
* @return Classe
*/
public function getClasse()
{
return $this->classe;
}
/**
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* @param string $firstName
* @return Participant
*/
public function setFirstName($firstName)
{
$this->firstName = $firstName;
return $this;
}
/**
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* @param string $lastName
* @return Participant
*/
public function setLastName($lastName)
{
$this->lastName = $lastName;
return $this;
}
/**
* @return \DateTime
*/
public function getBirthAt()
{
return $this->birthAt;
}
/**
* @param \DateTime $birthAt
* @return Participant
*/
public function setBirthAt($birthAt)
{
$this->birthAt = $birthAt;
return $this;
}
/**
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param string $phone
* @return Participant
*/
public function setPhone($phone)
{
$this->phone = $phone;
return $this;
}
public function getWp(): ?string
{
return $this->wp;
}
public function setWp(?string $wp): void
{
$this->wp = $wp;
}
/**
* @return string
*/
public function getPhone2()
{
return $this->phone2;
}
/**
* @param string $phone2
* @return Participant
*/
public function setPhone2($phone2)
{
$this->phone2 = $phone2;
return $this;
}
/**
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* @param string $email
* @return Participant
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* @return string
*/
public function getAddress()
{
return $this->address;
}
/**
* @param string $address
* @return Participant
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* @return string
*/
public function getCity()
{
return $this->city;
}
/**
* @param string $city
* @return Participant
*/
public function setCity($city)
{
$this->city = $city;
return $this;
}
/**
* @return string
*/
public function getSchoolLevel()
{
return $this->schoolLevel;
}
/**
* @param string $schoolLevel
* @return Participant
*/
public function setSchoolLevel($schoolLevel)
{
$this->schoolLevel = $schoolLevel;
return $this;
}
/**
* @return string
*/
public function getCin()
{
return $this->cin;
}
/**
* @param string $cin
* @return Participant
*/
public function setCin($cin)
{
$this->cin = $cin;
return $this;
}
/**
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* @param string $gender
* @return Participant
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* @return string
*/
public function getBirthIn()
{
return $this->birthIn;
}
/**
* @param string $birthIn
* @return Participant
*/
public function setBirthIn($birthIn)
{
$this->birthIn = $birthIn;
return $this;
}
/**
* @return string
*/
public function getNationality()
{
return $this->nationality;
}
/**
* @param string $nationality
* @return Participant
*/
public function setNationality($nationality)
{
$this->nationality = $nationality;
return $this;
}
/**
* @return string
*/
public function getSchoolLast()
{
return $this->schoolLast;
}
/**
* @param string $schoolLast
* @return Participant
*/
public function setSchoolLast($schoolLast)
{
$this->schoolLast = $schoolLast;
return $this;
}
/**
* @return string
*/
public function getRegNumber()
{
return $this->regNumber;
}
/**
* @param string $regNumber
* @return Participant
*/
public function setRegNumber($regNumber)
{
$this->regNumber = $regNumber;
return $this;
}
/**
* @return string
*/
public function getSerieNumber(): ?string
{
return $this->serieNumber;
}
/**
* @param string $serieNumber
*/
public function setSerieNumber(?string $serieNumber): Participant
{
$this->serieNumber = $serieNumber;
return $this;
}
/**
* @return string
*/
public function getDiplomeNumber(): ?string
{
return $this->diplomeNumber;
}
/**
* @param string $diplomeNumber
*/
public function setDiplomeNumber(?string $diplomeNumber): Participant
{
$this->diplomeNumber = $diplomeNumber;
return $this;
}
/**
* @return string
*/
public function getIdMassar(): ?string
{
return $this->idMassar;
}
/**
* @param string $idMassar
*/
public function setIdMassar(?string $idMassar): Participant
{
$this->idMassar = $idMassar;
return $this;
}
/**
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* @param string $status
* @return Participant
*/
public function setStatus($status)
{
$this->status = $status;
// date_default_timezone_set('Africa/Casablanca');
$this->statusAt=new \DateTime('now');
return $this;
}
/**
* @return \DateTime
*/
public function getStatusAt()
{
return $this->statusAt;
}
/**
* @param \DateTime $statusAt
* @return Participant
*/
public function setStatusAt($statusAt)
{
$this->statusAt = $statusAt;
return $this;
}
public function getTrainingDuration(): ?string
{
return $this->trainingDuration;
}
public function setTrainingDuration(?string $trainingDuration): void
{
$this->trainingDuration = $trainingDuration;
}
/**
* @return string
*/
public function getCinImage()
{
return $this->cinImage;
}
/**
* @param string $cinImage
* @return Participant
*/
public function setCinImage($cinImage)
{
$this->cinImage = $cinImage;
return $this;
}
/**
* @return mixed
*/
public function getCinImageFile()
{
return $this->cinImageFile;
}
/**
* @return Participant
*/
public function setCinImageFile(mixed $cinImageFile)
{
$this->cinImageFile = $cinImageFile;
return $this;
}
/**
* @return string
*/
public function getSchoolLevelImage()
{
return $this->schoolLevelImage;
}
/**
* @param string $schoolLevelImage
* @return Participant
*/
public function setSchoolLevelImage($schoolLevelImage)
{
$this->schoolLevelImage = $schoolLevelImage;
return $this;
}
/**
* @return mixed
*/
public function getSchoolLevelImageFile()
{
return $this->schoolLevelImageFile;
}
/**
* @return Participant
*/
public function setSchoolLevelImageFile(mixed $schoolLevelImageFile)
{
$this->schoolLevelImageFile = $schoolLevelImageFile;
return $this;
}
/**
* @return string
*/
public function getImageName()
{
return $this->imageName;
}
/**
* @param string $imageName
* @return Participant
*/
public function setImageName($imageName)
{
$this->imageName = $imageName;
return $this;
}
/**
* @return mixed
*/
public function getImageFile()
{
return $this->imageFile;
}
/**
* @param mixed $imageFile
* @return Participant
*/
public function setImageFile(UploadedFile $imageFile=null)
{
$this->imageFile = $imageFile;
return $this;
}
public function getPhoto(){
return "<img src='../../../../".self::SERVER_PATH_TO_IMAGE_FOLDER.'/'.$this->imageName."' style='width: 100px;'>";
}
public function getCompletName(){
return $this->gender.' '.$this->lastName.' '.$this->firstName;
}
public function getPlainPassword(): ?string
{
return $this->plainPassword;
}
public function setPlainPassword(?string $plainPassword): Participant
{
$this->plainPassword = $plainPassword;
return $this;
}
/**
* @return float
*/
public function getMonthlyPayment(): ?float
{
return $this->monthlyPayment;
}
/**
* @param float $monthlyPayment
*/
public function setMonthlyPayment(?float $monthlyPayment): Participant
{
$this->monthlyPayment = $monthlyPayment;
return $this;
}
/**
* @return float
*/
public function getRegisterCosts(): ?float
{
return $this->registerCosts;
}
/**
* @param float $registerCosts
*/
public function setRegisterCosts(?float $registerCosts): Participant
{
$this->registerCosts = $registerCosts;
return $this;
}
/**
* @return string
*/
public function getOtherCosts(): ?string
{
return $this->otherCosts;
}
/**
* @param string $otherCosts
*/
public function setOtherCosts(?string $otherCosts): Participant
{
$this->otherCosts = $otherCosts;
return $this;
}
/**
* @return float
*/
public function getDiplomaCosts(): ?float
{
return $this->diplomaCosts;
}
/**
* @param float $diplomaCosts
*/
public function setDiplomaCosts(?float $diplomaCosts): Participant
{
$this->diplomaCosts = $diplomaCosts;
return $this;
}
/**
* @return string
*/
public function getFirstNameAr(): ?string
{
return $this->firstNameAr;
}
/**
* @param string $firstNameAr
*/
public function setFirstNameAr(?string $firstNameAr): Participant
{
$this->firstNameAr = $firstNameAr;
return $this;
}
/**
* @return string
*/
public function getLastNameAr(): ?string
{
return $this->lastNameAr;
}
/**
* @param string $lastNameAr
*/
public function setLastNameAr(?string $lastNameAr): Participant
{
$this->lastNameAr = $lastNameAr;
return $this;
}
/**
* @return string
*/
public function getBirthInAr(): ?string
{
return $this->birthInAr;
}
/**
* @param string $birthInAr
*/
public function setBirthInAr(?string $birthInAr): Participant
{
$this->birthInAr = $birthInAr;
return $this;
}
/**
* @return string
*/
public function getAddressAr(): ?string
{
return $this->addressAr;
}
/**
* @param string $addressAr
*/
public function setAddressAr(?string $addressAr): Participant
{
$this->addressAr = $addressAr;
return $this;
}
/**
* @return bool
*/
public function isDiscount()
{
return $this->discount;
}
/**
* @param bool $discount
* @return Participant
*/
public function setDiscount($discount)
{
$this->discount = $discount;
return $this;
}
/**
* Add payment
*
*
* @return Participant
*/
public function addPayment(Apayment $payment)
{
$payment->setParticipant($this);
$this->payments[] = $payment;
return $this;
}
/**
* Remove payment
*/
public function removePayment(Apayment $payment)
{
$this->payments->removeElement($payment);
}
/**
* Get payments
*
* @return Collection
*/
public function getPayments()
{
return $this->payments;
}
public function addCost(Cost $cost)
{
$cost->setParticipant($this);
$this->costs[] = $cost;
return $this;
}
/**
* Remove cost
*/
public function removeCost(Cost $cost)
{
$this->costs->removeElement($cost);
}
/**
* Get costs
*
* @return Collection
*/
public function getCosts()
{
return $this->costs;
}
/**
* Add aabsence
*
*
* @return Participant
*/
public function addAabsence(Aabsence $aabsence)
{
$aabsence->setParticipant($this);
$this->aabsences[] = $aabsence;
return $this;
}
/**
* Remove aabsence
*/
public function removeAabsence(Aabsence $aabsence)
{
$this->aabsences->removeElement($aabsence);
}
/**
* Get aabsences
*
* @return Collection
*/
public function getAabsences()
{
return $this->aabsences;
}
public function getAabsencesByTimetableItemAndPeriod(Timetableitem $timetableitem, $start, $end){
$startDate =DateTime::createFromFormat('d-m-Y H:i', $start.' 00:00');
$endDate =DateTime::createFromFormat('d-m-Y H:i', $end.' 23:59');
/** @var Aabsence $aabsence */
foreach ($this->aabsences as $aabsence){
if($aabsence->getAseance()->getTimetableitem()===$timetableitem && $aabsence->getAseance()->getTakesplaceOn() >= $startDate && $aabsence->getAseance()->getTakesplaceOn() <= $endDate) return $aabsence;
}
return null;
}
public function getAbsencesByPeriod($start, $end)
{
$startDate =DateTime::createFromFormat('d-m-Y H:i', $start.' 00:00');
$endDate =DateTime::createFromFormat('d-m-Y H:i', $end.' 23:59');
$absences=[];
/** @var Aabsence $absence */
foreach ($this->aabsences as $absence){
if($absence->getAseance()->getTakesplaceOn() >= $startDate && $absence->getAseance()->getTakesplaceOn() <= $endDate && $absence->isPublished()) {
$absences[]=$absence;
}
}
// usort($absences, function (Absence $a, Absence $b) {
// return $a->getSeance()->getTakesplaceOn() <=> $b->getSeance()->getTakesplaceOn();
// });
return $absences;
}
public function getLastAbsentSeance(): ?Aseance
{
$lastAbsence = null;
/** @var Aabsence $absence */
foreach ($this->getAabsences() as $absence) {
if (($lastAbsence === null || $absence->getAseance()->getTakesplaceOn() > $lastAbsence->getAseance()->getTakesplaceOn()) && $absence->isPublished()) {
$lastAbsence = $absence;
}
}
return $lastAbsence ? $lastAbsence->getAseance() : null;
}
public function monthStart($month){
// date_default_timezone_set('Africa/Casablanca');
$format = 'd/m/y H:i:s';
$date= \DateTime::createFromFormat($format, '1/'.$month.' 00:00:00');
if($date && $date->format('m/y')==$month) return $date;
else return \DateTime::createFromFormat($format, '01/07/16 00:00:00');
}
public function monthEnd($month){
// date_default_timezone_set('Africa/Casablanca');
$format = 'd/m/y H:i:s';
return \DateTime::createFromFormat($format, $this->monthStart($month)->format('t/m/y').' 23:59:59');
}
public function isAbandonedMonth($month){
if($this->status=='Abandonné' && $this->monthStart($month)>$this->statusAt) return true;
return false;
}
public function getCostByTypeName($type, $name){
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->getName()==$name && $cost->getType()==$type) return $cost;
}
return null;
}
public function getCostsTraining(){
return $this->monthlyPayment ?? $this->classe->getMonthlyPayment();
}
public function getCostsRegister(){
return $this->registerCosts ?? $this->classe->getRegisterCosts();
}
public function getCostsByType($type)
{
$costs=[];
foreach ($this->costs as $cost){
if($cost->getType()==$type){
$costs[]=$cost;
}
}
return $costs;
}
public function getToPay($type){
$mCosts=0;
if($type=='all'){
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->isCounted()) $mCosts+=$cost->getMontant();
}
}
else{
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->getType()==$type && $cost->isCounted()) $mCosts+=$cost->getMontant();
}
}
return $mCosts;
}
public function getOutDate($type, $year=null){
$mCosts=0;
if($type=='all' && $year==null){
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->isExpired()) $mCosts+=$cost->getMontant();
}
}
elseif($year==null){
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->getType()==$type && $cost->isExpired()) $mCosts+=$cost->getMontant();
}
}
elseif($type=='all'){
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->getActivityYear()==$year && $cost->isExpired()) $mCosts+=$cost->getMontant();
}
}
else{
/** @var Cost $cost */
foreach ($this->costs as $cost){
if($cost->getType()==$type && $cost->getActivityYear()==$year && $cost->isExpired()) $mCosts+=$cost->getMontant();
}
}
return $mCosts;
}
public function getTotalPay($costs){
$m=0;
if($costs=='all'){
/** @var Apayment $payment */
foreach ($this->payments as $payment){
/** @var Apayline $item */
foreach ($payment->getItems() as $item){
$m+=$item->getAmount();
}
}
}
elseif ($costs!=="registerCosts" && $costs!=="monthlyPayment"){
/** @var Apayment $payment */
foreach ($this->payments as $payment){
/** @var Apayline $item */
foreach ($payment->getItems() as $item){
if($item->getCost()->getName()==$costs) $m+=$item->getAmount();
}
}
}
else{
/** @var Apayment $payment */
foreach ($this->payments as $payment){
/** @var Apayline $item */
foreach ($payment->getItems() as $item){
if($item->getCost()->getType()==$costs) $m+=$item->getAmount();
}
}
}
return $m;
}
public function getRestPay($costs){
return ($this->getToPay($costs)-$this->getTotalPay($costs)>0)?($this->getToPay($costs)-$this->getTotalPay($costs)):0;
}
public function getAdvance($costs){
return ($this->getToPay($costs)-$this->getTotalPay($costs)<0)?-($this->getToPay($costs)-$this->getTotalPay($costs)):0;
}
public function getPayByMonth($month)
{
}
public function getPcPay($costs){
if($this->getToPay($costs)!=0)
return round($this->getTotalPay($costs)/$this->getToPay($costs)*100,0);
else
return -1;
}
public function getCostByMonth($month)
{
/** @var Cost $cost */
foreach ($this->costs as $cost)
if ($cost->getType()=='monthlyPayment' && $cost->getName()==$month) {
return $cost;
}
return null;
}
public function getBgClassCosts(Cost $cost){
if($cost->isPaied()) return 'bg-green';
elseif ($cost->amountPaied()>0) return 'bg-light-blue';
else return $this->classe->getBgClass($cost->getName());
}
public function getBgClass($m){
if(in_array($m,$this->getMonthsPaid('short'),true)){
return 'bg-green';
}
elseif($m==$this->getMonthPaidPartially('short'))
return 'bg-light-blue';
else return $this->classe->getBgClass($m);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
* * * * * * * * * * * * *
* * * * * * * *
* * * * * * * * * * *
* * * * * * * *
* * * * * * * * *
* */
public function __toString(): string
{
return $this->getLastName().' '.$this->getFirstName();
}
public function getName(): string
{
return $this->getLastName().' '.$this->getFirstName();
}
public function getRegistrationAt(): DateTime
{
return $this->registrationAt;
}
public function setRegistrationAt(DateTime $registrationAt): Participant
{
$this->registrationAt = $registrationAt;
return $this;
}
public function createAvatar(ParameterBagInterface $parameterBag)
{
$thumbWidth = 70;
$sourceImagePath = $parameterBag->get('kernel.project_dir') . '/public/images/participant/';
$sourceImage = imagecreatefromjpeg($sourceImagePath.$this->imageName);
$destImagePath = $sourceImagePath . 'thumbs/'.$this->imageName;
$orgWidth = imagesx($sourceImage);
$orgHeight = imagesy($sourceImage);
$thumbHeight = floor($orgHeight * ($thumbWidth / $orgWidth));
$destImage = imagecreatetruecolor($thumbWidth, $thumbHeight);
imagecopyresampled($destImage, $sourceImage, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $orgWidth, $orgHeight);
imagejpeg($destImage, $destImagePath);
imagedestroy($sourceImage);
imagedestroy($destImage);
}
}