about | help | code help+videos | done | prefs |
Write a method that accepts a string array of Disney World ride names called 'rides' and an integer array of associated wait times called 'waitTime'. As preconditions you may assume that both arrays are of the same length, although that length could be zero for both of them. There is also an input parameter called 'ride'. The ride in 'rides' matches the wait time in 'waitTime' at the same index. Your goal is to return the correct wait time for the indicated ride. The name of the ride given in 'ride' must EXACTLY match the name given in 'rides', including having the same capitalization and punctuation. If there is no match, return 9999 as an error code. As always, look at the test data for examples. test2024_08_29_SLHL_waitTimes([], [], "Astro Orbiters") → 9999 test2024_08_29_SLHL_waitTimes(["Winnie the Pooh", "It's a Small World", "Haunted Mansion", "Tiki Room"], [50, 10, 90, 10], "Tiki Room") → 10 test2024_08_29_SLHL_waitTimes(["Winnie the Pooh", "It's a Small World", "Haunted Mansion", "Tiki Room"], [50, 10, 90, 10], "Small World") → 9999 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy