public Reservation(Customer customer, Screening screening, Money fee, int audienceCount) { this.customer = customer; this.screening = screening; this.fee = fee; this.audienceCount = audienceCount; }
public Money CalculateDiscountAmount(Screening screening) { foreach (var each in conditions) { if (each.IsSatisfiedBy(screening)) { return(getDiscountAmount(screening)); } } return(screening.MovieFee); }
public Money calculateMovieFee(Screening screening) { return(Fee - discountPolicy.CalculateDiscountAmount(screening)); }
protected override Money getDiscountAmount(Screening screening) { return(new Money(0)); }
protected override Money getDiscountAmount(Screening screening) { return(screening.MovieFee * percent); }
protected override Money getDiscountAmount(Screening screening) { return(discountAmount); }
abstract protected Money getDiscountAmount(Screening screening);
public bool IsSatisfiedBy(Screening screening) { return(screening.StartTime.DayOfWeek.Equals(dayOfWeek) && startTime <= screening.StartTime.TimeOfDay && endTime >= screening.StartTime.TimeOfDay); }
public bool IsSatisfiedBy(Screening screening) { return(screening.IsSequence(sequence)); }