Ejemplo n.º 1
0
        public RentForFamily()
        {
            contexto = new RentContext();
            IRentCostStrategy rent = new FamilyCostStrategy();

            contexto.RentStrategy = rent;
        }
Ejemplo n.º 2
0
        public RentByWeek()
        {
            contexto = new RentContext();
            IRentCostStrategy rent = new WeekCostStrategy();

            contexto.RentStrategy = rent;
        }
Ejemplo n.º 3
0
        public RentByHour()
        {
            contexto = new RentContext();
            IRentCostStrategy rentbyhour = new HourCostStrategy();

            contexto.RentStrategy = rentbyhour;
        }
Ejemplo n.º 4
0
        public RentByDay()
        {
            contexto = new RentContext();
            IRentCostStrategy rentbyday = new DayCostStrategy();

            contexto.RentStrategy = rentbyday;
        }