/**
 * Squirrels.
 * Taking the Coding Bat Squirrel Play and localizing it.
 * @author Alvin Chao
 * @version 10-10-18
 * I have abided by the JMU honor code.
 */
 
public class Squirrels {

    /**
     * SquirrelPlay.
     * Implements coding bat problem - https://codingbat.com/prob/p141061
     * The squirrels in Palo Alto spend most of the day playing. 
     * In particular, they play if the temperature is between 60 and 90 
     * (inclusive). Unless it is summer, then the upper limit is 100 
     * instead of 90. Given an int temperature and a boolean isSummer, 
     * return true if the squirrels play and false otherwise.
     * squirrelPlay(70, false) → true
     * squirrelPlay(95, false) → false
     * squirrelPlay(95, true) → true
     * @param temp - integer for temperature outside
     * @param isSummer - boolean if it is summer or not.
     * @return boolean for playing outside or not.
     */
     
    public static boolean squirrelPlay(int temp, boolean isSummer) {
        int upperlimit = 90;
        int lowerlimit = 60;
        if (isSummer) 
            upperlimit = 100;
        if (temp >= lowerlimit && temp <= upperlimit) {
            return true;
        }
        return false;
   
    }
}
