private IPainter Reduce(double sqMeters)
        {
            TimeSpan time =
                TimeSpan.FromHours(
                    1 /
                    Painters
                    .Where(painter => painter.Status == PainterStatus.Available)
                    .Select(painter => 1 / painter.EstimateTimeToPaint(sqMeters).TotalHours)
                    .Sum());

            double cost =
                Painters
                .Where(painter => painter.Status == PainterStatus.Available)
                .Select(painter =>
                        painter.EstimatePrice(sqMeters) /
                        painter.EstimateTimeToPaint(sqMeters).TotalHours *time.TotalHours)
                .Sum();

            return(new ProportionalPainter(PainterStatus.Available, TimeSpan.FromHours(time.TotalHours / sqMeters),
                                           cost / time.TotalHours));
        }
 public PaintersCompany(Painters painters)
 {
     _painters = painters;
 }
 public CompositePainter(Painters painters)
 {
     this.Painters = painters.ContainedPainters.ToList();
 }
 public CompositePainter(Painters painters, IOrganizePainters organizePainters)
 {
     this.Painters     = painters.ContainedPainters.ToList();
     _organizePainters = organizePainters;
 }