Created
June 19, 2020 19:52
-
-
Save sasssass/ea9df7fc53e1f7b0745c4dfd4ce04392 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 Demo{ | |
fun doSth(){ | |
val motor = ElectricMotor() | |
val thermometer = Thermometer() | |
thermometer.addPropertyChangeListener(motor) | |
thermometer.temperature = 10 | |
thermometer.temperature = 50 | |
thermometer.temperature = 200 | |
thermometer.removePropertyChangeListener(motor) | |
thermometer.temperature = 10 | |
thermometer.temperature = 50 | |
thermometer.temperature = 200 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment