Пример #1
0
        public RentForFamily()
        {
            contexto = new RentContext();
            IRentCostStrategy rent = new FamilyCostStrategy();

            contexto.RentStrategy = rent;
        }
Пример #2
0
        public RentByWeek()
        {
            contexto = new RentContext();
            IRentCostStrategy rent = new WeekCostStrategy();

            contexto.RentStrategy = rent;
        }
Пример #3
0
        public RentByHour()
        {
            contexto = new RentContext();
            IRentCostStrategy rentbyhour = new HourCostStrategy();

            contexto.RentStrategy = rentbyhour;
        }
Пример #4
0
        public RentByDay()
        {
            contexto = new RentContext();
            IRentCostStrategy rentbyday = new DayCostStrategy();

            contexto.RentStrategy = rentbyday;
        }