Last active
May 30, 2022 03:47
-
-
Save mcsee/7133ca38aceb3bace14d25548610f682 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 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