Last active
November 10, 2018 01:35
-
-
Save jeanPokou/4e4956a99f50bb091914e7bd822bc544 to your computer and use it in GitHub Desktop.
Main class for Observer Pattern
This file contains hidden or 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
fun main() { | |
// we create a speaker | |
val speaker = Speaker() | |
// we add three audiences to the speaker | |
speaker.addAudience(audience = Audience()) | |
speaker.addAudience(audience = Audience()) | |
speaker.addAudience(audience = Audience()) | |
// set the message | |
speaker.setMessage("Hello People!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment