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.

ChildrensPrice.java 427B

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