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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!