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

 

abraskin@mbusd.org 2016_student_creations_01 > waitTime
prev  |  next  |  chance

You are asked to report wait times for rides at an amusement park. Wait times are calculated by the number of people in line divided by the of the rate of people that get on the ride in a minute. If the ride name contains "Scary" and the time is within 5 minutes of 13 (inclusive of 18 and 8), automatically change the ride time to "13 minute(s)". Example: waitTime("Racing Dragon",60,3) = "20 minute(s)" waitTime("Scary House",75,5) = "13 minute(s)"


waitTime("Racing Dragon", 60, 3) → "20 minute(s)"
waitTime("Scary House", 75, 5) → "13 minute(s)"
waitTime("The Runner", 80, 2) → "40 minute(s)"

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

String waitTime(String rideName, int peopleInLine, int rideRate) { }

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

Copyright Nick Parlante 2017 - privacy