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); }
public Rental(Movie movie, Int32 daysRented) { this.movie = movie; this.daysRented = daysRented; }
public Rental(Movie movie,int daysRented) { _movie = movie; _daysRented = daysRented; }