Exemplo n.º 1
0
        public Rental(Movie movie, int daysRented)
        {
            this.movie = movie;
            this.daysRented = daysRented;

            this.rentalRules = new MovieRentalRules[3];
            rentalRules[(int)MovieType.Regular] = new MovieRentalRules((days) => 2 + ((days > 2) ? (days - 2) * 1.5 : 0), (days) => 1);
            rentalRules[(int)MovieType.NewRelease] = new MovieRentalRules((days) => days * 3, (days) => days > 1 ? 2 : 1);
            rentalRules[(int)MovieType.ChildrensMovie] = new MovieRentalRules((days) => 1.5 + ((days > 3) ? (days - 3) * 1.5 : 0), (days) => 1);
        }
Exemplo n.º 2
0
 public Rental(Movie movie, Int32 daysRented)
 {
     this.movie = movie;
     this.daysRented = daysRented;
 }
Exemplo n.º 3
0
 public Rental(Movie movie,int daysRented)
 {
     _movie = movie;
     _daysRented = daysRented;
 }