Tuesday, June 10, 2008
Friday, June 6, 2008
Viernes
public class Friday : WorkingDay
{
public override void Work(Person person)
{
while (this.PreviousDay.StillInParty)
{
person.Drink();
}
Datetime arriveHome = DateTime.Now;
TimeSpan sleeping = this.WorkStartTime - arriveHome;
if (sleeping.Hours < 4 && person.Beers.Count > 10)
{
throw new WorkingDrunkException();
}
}
}
{
public override void Work(Person person)
{
while (this.PreviousDay.StillInParty)
{
person.Drink();
}
Datetime arriveHome = DateTime.Now;
TimeSpan sleeping = this.WorkStartTime - arriveHome;
if (sleeping.Hours < 4 && person.Beers.Count > 10)
{
throw new WorkingDrunkException();
}
}
}
Subscribe to:
Posts (Atom)