Page 649 - IT2
P. 649
private string Tel;
public string Tel1
{
get { return Tel; }
set
{
if (Tel.Length < 10)
{ throw new telException(); }
else
{ Tel = value; }
}
}
public string Ville { get; set; }
public Patient() { }
public Patient(string cin, string nom, string prenom, string adresse, string Genre, float Age ,
string Tel, string Ville )
{
if (Tel.Length < 10)
{ throw new telException(); }
else
{
this.Cin = cin;
this.Nom = nom;
this.Prenom = prenom;
this.Adresse = adresse;
this.Genre = Genre;
this.Age = Age;
this.Tel = Tel;
this.Ville = Ville;
}
}
public void Afficher()
{
if(18 < Age)
Console.WriteLine( "CIN:" + this.Cin + " Nom\n" + this.Nom + "Prenom\n" + this.Prenom
+ "Adresse:" + this.Adresse + " Genre\n" + this.Genre + "Age\n" + this.Age + "Tel:" + this.Tel + "
Ville\n" + this.Ville);
}
public override string ToString()
{
return "CIN:"+ this.Cin + " Nom\n" + this.Nom + "Prenom\n" + this.Prenom+"Adresse:"+
this.Adresse + " Genre\n" + this.Genre + "Age\n" +this.Age+ "Tel:"+ this.Tel + " Ville\n" +
this.Ville ;
Filière Epreuve Session 8/13
TDI (CDS de 2 à 3) Synthèse V2 (Correction) Juillet 2014
www.itlearning-settat.com
Email: admission@itlearning-settat.com
Tél.:0661077812

