Skip to content

Instantly share code, notes, and snippets.

@ikovalyov
Created March 29, 2020 13:57
Show Gist options
  • Save ikovalyov/2a2ebf0c6d9d4aa9ece9406d0c99825d to your computer and use it in GitHub Desktop.
Save ikovalyov/2a2ebf0c6d9d4aa9ece9406d0c99825d to your computer and use it in GitHub Desktop.
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