public Transaction(Customer customer, Film film, int days) { Calculator calc = new Calculator(); this.customer = customer; this.film = film; this.days = days; this.price = calc.PerformOperation("useMoney", film.FilmType, days); int bonusCost = (int)calc.PerformOperation("useBonus", film.FilmType, days); this.bonusable = this.customer.bonusPoints >= bonusCost; this.bonusPoints = (this.bonusable) ? bonusCost : 0; }
public Customer(Customer customer) { this.bonusPoints = customer.bonusPoints; }