Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created December 12, 2019 12:38
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/1e95770e65d207ed6987f443737944e7 to your computer and use it in GitHub Desktop.
Save jasongorman/1e95770e65d207ed6987f443737944e7 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.get_title() \
+ ", price: £" + str(self._movie.get_price())
def get_customer(self):
return self._customer
def get_movie_price(self):
return self._movie.get_price()
def get_movie_title(self):
return self._movie.get_title()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment