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

 

abraskin@mbusd.org > isHazard
prev  |  next  |  chance

It is illegal to drive both slower and faster than the flow of traffic if the speed would cause a hazard to other traffic.


Complete the isHazard method which returns true if the parameter, mySpeed, is more than 10 miles above or below the second parameter, trafficSpeed or false otherwise.

isHazard(43, 45) → false
isHazard(35, 45) → false
isHazard(34.9, 45) → true

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

public boolean isHazard(double mySpeed, double trafficSpeed) { }

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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy