-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCentreDeVaccination.cs
37 lines (33 loc) · 1.1 KB
/
CentreDeVaccination.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// File: CentreDeVaccination.cs
// Author: ABDERRAZZAQ LAANOUI
// Created: 03 December 2020 13:36:59
// Purpose: Definition of Class CentreDeVaccination
namespace Covid19Track
{
// date de vaccination est calculable (DURÉE DE PROTECTION ) => Last record vaccinee
public class CentreDeVaccination : Etablissement
{
public CentreDeVaccination(string reference, string nom)
{
this.nom = nom;
this.reference = reference;
}
public override string ToString()
{
return "Centre de Vaccination " + nom + " est sous le reference: " + reference;
}
public void InjecteDose(Citoyen citoyen)
{
//si le citoyen a injecté 2 doses de vaccine il devient vaccinée
bool res = (++citoyen.DosesInjectee >= 2);
EnvoyerDonnees(citoyen, res);
}
protected override void EnvoyerDonnees(Citoyen citoyen, bool vacciner)
{
if (vacciner)
{
MinistereDeLaSante.ChangerEtatCitoyen(citoyen, Etats.Vaccine);
}
}
}
}