id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > coverPlants
prev  |  next  |  chance

Write a method called coverPlants that returns true if you need to cover your plants based on the forcasted low temperature and wind speed for that night. The parameters temp and windSpeed are in degrees Fahrenheit and in mile per hour respectively. We will cover the plants if the apparent temperature is below 32 degrees. The apparent temperature is the actual temperature reduced by one degree for each mile per hour of wind speed. However, if the actual temperature is above 45 degrees, it doesn't matter how fast the wind is, we do not need to cover our plants.


coverPlants(36, 3) → false
coverPlants(44, 12) → false
coverPlants(44, 13) → true

...Save, Compile, Run (ctrl-enter)

public boolean coverPlants(int temp, int windSpeed) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 220

Copyright Nick Parlante 2017 - privacy