Assume your class has a method with this header: public static boolean getBooleanInput(String prompt) This method prints prompt and inputs a keyboard entry. If the entry is either \'y\' or \'Y\', the method returns true. Otherwise, it returns false. Write a single java println statement containing nested conditional operator expressions that use two calls to the above method to implement the logic implied by the following sample sessions: Sample session # 1: Noticed (y/n)? y Trapped (y/n)? y fight Sample session # 2: Noticed (y/n)? y Trapped (y/n)? n flee Sample session # 3: Noticed (y/n)? n freeze Solution /* Conditional.java containing nested conditional operator expressions that use two calls to implement the logic implied */ import java.util.Scanner; public class Conditional { public static void main(String[] args) { if (getBooleanInput(\"Noticed (y/n)? \")) { if (getBooleanInput(\"Trapped (y/n)? \")) { System.out.println(\"fight\"); } else System.out.println(\"flee\"); } else { System.out.println(\"freeze\"); } } public static boolean getBooleanInput(String prompt) { System.out.print(prompt); Scanner input = new Scanner(System.in); char ch = input.next().charAt(0); System.out.println(ch); if (ch == \'y\' || ch == \'Y\') { return true; } else return false; } } .