Created
July 12, 2013 08:47
-
-
Save akhikhl/5982897 to your computer and use it in GitHub Desktop.
My birthday!
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 Main { | |
public void main(String[] args) { | |
Person p = new Person("Andrey", "Hihlovskiy", "12.07.1969"); | |
boolean hasBirthDayToday = p.hasBirthDay(new Date()); | |
if(hasBirthDayToday) | |
p.say("Friends", "Hey, guys, have a cake, it's my birthday!") | |
while(isWorkingHours()) { | |
p.work(); | |
p.drink(DRINK.COFFEE, STRENGTH.EXTREME, 0.2); | |
} | |
if(hasBirthDayToday) { | |
while(p.getRelaxation() > 1000) | |
p.drink(DRINK.BEER, STRENGTH.NORMAL, 0.5); | |
p.say("World", "What a wonderful world!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment