You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* We have a loud talking parrot. The "hour" parameter is the current hour time in the range 0..23. We are in trouble if the parrot is talking and the hour is before 7 or after 20. Return true if we are in trouble.
* parrotTrouble(true, 6) → true
* parotTrouble(true, 7) → false
* parrotTrouble(false, 6) → false
*/
public class ParrotTrouble {
public static void main( String[] args ) {
// Test value
System.out.println( parrotTrouble( true, 7 ) );
}
public static boolean parrotTrouble( boolean talking, int hour ) {