Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BarkingDog {
- public static boolean shouldWakeUp (boolean shouldWakeUp, int hourOfDay){
- if (hourOfDay < 0 || hourOfDay > 23){
- return false;
- }else if (shouldWakeUp && hourOfDay < 8 || hourOfDay > 22){
- return true;
- }return false;
- }
- }
- public class BarkingDog {
- public static boolean shouldWakeUp (boolean shouldWakeUp, int hourOfDay){
- if (hourOfDay < 0 || hourOfDay > 23){
- return false;
- }else return shouldWakeUp && hourOfDay < 8 || hourOfDay > 22;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement