コード例 #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
ファイル: RentByDay.cs プロジェクト: rledesma912/BikeRentApp
        public RentByDay()
        {
            contexto = new RentContext();
            IRentCostStrategy rentbyday = new DayCostStrategy();

            contexto.RentStrategy = rentbyday;
        }