Created
August 1, 2019 09:40
-
-
Save 0ryant/ba8a845221d8b69b6d20750d882732d9 to your computer and use it in GitHub Desktop.
Java - Coding Challenge 3 - Barking dog
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
public class BarkingDog { | |
public static boolean shouldWakeUp(boolean barking,int hourOfDay){ | |
if (hourOfDay <0 || hourOfDay >23){ | |
return false; | |
} | |
if (barking == true && hourOfDay <8 || hourOfDay >22){ | |
return true; | |
}else{ | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.