Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active May 30, 2022 03:47
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 mcsee/7133ca38aceb3bace14d25548610f682 to your computer and use it in GitHub Desktop.
Save mcsee/7133ca38aceb3bace14d25548610f682 to your computer and use it in GitHub Desktop.
class PhoneCall:
_origin = ''
_destination = ''
_duration = 0
def set_origin(self, originNumber):
self._origin = originNumber
def set_destination(self, destinationNumber):
self._destination = destinationNumber
def set_duration(self, durationInSeconds):
self._duration = durationInSeconds
janePhoneCall = PhoneCall()
janePhoneCall.set_origin('555-5555')
janePhoneCall.set_destination('444-4444')
janePhoneCall.set_duration(60)
# Anemic and mutable Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment