You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NewReleasePrice.java 473B

123456789101112131415161718
  1. public class NewReleasePrice implements Price {
  2. @Override
  3. public int getPriceCode() {
  4. return Movie.NEW_RELEASE;
  5. }
  6. @Override
  7. public double getFee(int daysRented) {
  8. double thisAmount = daysRented * 3;
  9. return thisAmount;
  10. }
  11. @Override
  12. public int getBonus( int daysRented ) {
  13. int frequentRenterPoints = 1;
  14. if( daysRented > 1 )
  15. frequentRenterPoints++;
  16. return frequentRenterPoints;
  17. }
  18. }