Created
December 12, 2019 12:31
-
-
Save jasongorman/c9f02a1815b46bea8a1ccbc4783d471e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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