Created
December 12, 2019 12:38
-
-
Save jasongorman/1e95770e65d207ed6987f443737944e7 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.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