Created
March 13, 2019 04:21
-
-
Save horaceho/15d77ff257253e46996ac119e9838779 to your computer and use it in GitHub Desktop.
HIIT class
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 Hiit { | |
| String name; | |
| int warm; | |
| int work; | |
| int rest; | |
| int sets; | |
| int cool; | |
| Hiit(this.name, this.warm, this.work, this.rest, this.sets, this.cool) { | |
| // Initialization code goes here. | |
| } | |
| Hiit.tabata() : this('Tabata', 10, 20, 10, 8, 10); | |
| void describe() { | |
| print('$name: ${warm}s warm-up, $sets sets of ${work}s work & ${rest}s rest intervals, ${cool}s cool-down.'); | |
| } | |
| } | |
| void main() { | |
| var daily = Hiit('Daily', 10, 30, 10, 5, 10); | |
| daily.describe(); | |
| var tabata = Hiit.tabata(); | |
| tabata.describe(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment