Skip to content

Instantly share code, notes, and snippets.



Last active Nov 19, 2020
What would you like to do?
class PhoneCall:
_origin = ''
_destination = ''
_duration = 0
def set_duration(self, durationInSeconds):
self._duration = durationInSeconds
def get_duration(self):
return self._duration
#duration is exposed in seconds as a ripple effect
#this violates information hiding principle and prevents us from changing it representation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment