Created
March 29, 2020 13:57
-
-
Save ikovalyov/2a2ebf0c6d9d4aa9ece9406d0c99825d to your computer and use it in GitHub Desktop.
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
class TeaPotService { | |
fun turnOn() { | |
//do something | |
} | |
fun turnOff() { | |
//do something | |
} | |
} | |
fun main() { | |
var teaPotTurnedOn = false | |
val turnOnTheTeaPot = true | |
val teaPotService = TeaPotService() | |
if (turnOnTheTeaPot) { | |
teaPotService.turnOn() | |
teaPotTurnedOn = true | |
} else { | |
teaPotService.turnOff() | |
teaPotTurnedOn = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment