-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRencontre.cs
40 lines (34 loc) · 1013 Bytes
/
Rencontre.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
38
39
40
// File: Citoyen.cs
// Author: ABDERRAZZAQ LAANOUI
// Created: 03 December 2020 02:34:33
// Purpose: Definition of Class Record
using System;
using System.Collections.Generic;
namespace Covid19Track
{
public class Rencontre
{
public Citoyen citoyen { get; }
public DateTime date { get; }
private Rencontre( Citoyen citoyen)
{
this.citoyen = citoyen;
date = DateTime.Now;
}
private Rencontre(Citoyen citoyen, DateTime date)
{
this.citoyen = citoyen;
this.date = date;
}
public static void AddRencontre(Citoyen c1, Citoyen c2)
{
c1.Rencontres.Add(new Rencontre(c2));
c2.Rencontres.Add(new Rencontre(c1));
}
public static void AddRencontre(Citoyen c1, Citoyen c2, DateTime date)
{
c1.Rencontres.Add(new Rencontre(c2, date));
c2.Rencontres.Add(new Rencontre(c1, date));
}
}
}