/* * Fill in the body of the methods below based upon the specification * provided. It may be helpful to look at the test cases provided in * Hw1pr3Test.java to understand the intended behavior of the method. * * All content is based upon problems at CodingBat.com */ public class Hw1pr3 { // Source: http://codingbat.com/prob/p187868 /* * The parameter weekday is true if it is a weekday, and the parameter * vacation is true if we are on vacation. We sleep in if it is not a * weekday or we're on vacation. Return true if we sleep in. */ public static boolean sleepIn(boolean weekday, boolean vacation) { return true; // replace this with your code. } // Source: http://codingbat.com/prob/p182873 /* * Given 2 ints, a and b, return true if one if them is 10 or if their sum * is 10. */ public static boolean makes10(int a, int b) { return true; // replace this with your code. } // Source: http://codingbat.com/prob/p181646 /* * We have two monkeys, a and b, and the parameters aSmile and bSmile * indicate if each is smiling. We are in trouble if they are both smiling * or if neither of them is smiling. Return true if we are in trouble. */ public static boolean monkeyTrouble(boolean aSmile, boolean bSmile) { return true; } // Source: http://codingbat.com/prob/p144535 /* * Given 2 int values, return true if either of them is in the range 10..20 * inclusive. */ public static boolean in1020(int a, int b) { return true; // replace this with your code. } // Source: http://codingbat.com/prob/p192082 /* * Given two temperatures, return true if one is less than 0 and the other * is greater than 100. */ public static boolean icyHot(int temp1, int temp2) { return true; // replace this with your code. } // Source: http://codingbat.com/prob/p178986 /* * We'll say that a number is "teen" if it is in the range 13..19 inclusive. * Given 3 int values, return true if 1 or more of them are teen. */ public static boolean hasTeen(int a, int b, int c) { return true; // replace this with your code. } // http://codingbat.com/prob/p125339 /* * Given two non-negative int values, return true if they have the same last * digit, such as with 27 and 57. Note that the % "mod" operator computes * remainders, so 17 % 10 is 7. */ public static boolean lastDigit(int a, int b) { return true; // replace this with your code. } // Source: http://codingbat.com/prob/p159227 /* * Given 2 int values, return true if one is negative and one is positive. * Except if the parameter "negative" is true, then return true only if both * are negative. */ public static boolean posNeg(int a, int b, boolean negative) { return true; // replace this with your code. } public static void main(String[] args) { System.out.println("Run the file Hw1pr3Test.java not Hw1pr3.java"); } }