Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created December 12, 2019 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/c9f02a1815b46bea8a1ccbc4783d471e to your computer and use it in GitHub Desktop.
Save jasongorman/c9f02a1815b46bea8a1ccbc4783d471e to your computer and use it in GitHub Desktop.
class Rental(object):
def __init__(self, customer, imdbID, pricer):
self._customer = customer
self._movie = pricer.price(imdbID)
def __str__(self):
return "Movie Rental - customer: " + self._customer \
+ ". Movie => title: " + self._movie.title \
+ ", price: £" + str(self._movie.price)
def customer(self):
return self._customer
def movie_price(self):
return self._movie.price()
def movie_title(self):
return self._movie.title()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment