|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using www.askbargains.com.Strategy;
namespace www.askbargains.com
{
namespace Client
{
class Program
{
static void Main(string[] args)
{
//initialize a daycare object
DaycareContext aDayCare = new DaycareContext();
//Kid Eliabeth is created
Kid kid1 = new Kid();
kid1.Name = "Elizabeth";
kid1.Age = 3;
//Kid Eliabeth is created
Kid kid2 = new Kid();
kid2.Name = "Aimee";
kid2.Age = 4;
//add two kids to the aDayCare object
aDayCare.Kids.Add(kid1);
aDayCare.Kids.Add(kid2);
//Client determines the condation for which doctor needs to be involved.
Console.WriteLine("Please type today's Date ==> (DD)");
string date = Console.ReadLine();
switch (date)
{
case "15":
aDayCare.Doctor_on_Duty = new EyeDoctor();
break;
case "28":
aDayCare.Doctor_on_Duty = new SLP();
break;
default:
Console.WriteLine("No doctor visit today");
break;
}
//loop all the kids
foreach (Kid oneKid in aDayCare.Kids)
{
//assign the particular kid to the doctor for the exam
aDayCare.Doctor_on_Duty.aKid = oneKid;
Console.WriteLine();
aDayCare.StartDoctorActivies();
}
Console.ReadLine();
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.