Question: Write a method called whatTowear that receives a double number temp for current temperature, and a Boolean raincheck for current rain possibility and returns a
Write a method called whatTowear that receives a double number temp for current temperature, and a Boolean raincheck for current rain possibility and returns a String with a phrase based on the following conditions: If the temperature is less than or equal to 40 degrees, return the statement "Wear a jacket" If the temperature is less than or equal to 40 degrees and raincheck is true, return the statement "Wear a jacket and bring umbrella" If the temperature is >40 degrees 40 degrees 69 degrees, return statement Wear light clothes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
