Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rightson/a6eeff7e716703499e4ce09bc32bbdcd to your computer and use it in GitHub Desktop.
Save rightson/a6eeff7e716703499e4ce09bc32bbdcd to your computer and use it in GitHub Desktop.
class Rental...
double getCharge() {
return _movie.getCharge(_daysRented);
}
class Rental...
int getFrequentRenterPoints() {
if ((getMovie().getPriceCode() == Movie.NEW_RELEASE) &&
getDaysRented() > 1)
return 2;
else
return 1;
}
class rental...
int getFrequentRenterPoints() {
return _movie.getFrequentRenterPoints(_daysRented);
}
class movie...
int getFrequentRenterPoints(int daysRented) {
if ((getPriceCode() == Movie.NEW_RELEASE) && daysRented > 1)
return 2;
else
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment