Created
November 10, 2018 01:23
-
-
Save jeanPokou/c7cd5bef410ba82b0774e307ad084188 to your computer and use it in GitHub Desktop.
Audience class for Java Observer Pattern
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 Audience() { | |
private var message= Message("") | |
fun update(message: Message) { | |
this.message = message | |
print("Got a new message: ${message.text}\n") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment