about | help | code help+videos | done | prefs |
The Mazda Miata began production in 1989 and has continued until the present. The models from 1989 through 1997 had pop-up headlights. Since then, all models have had fixed headlights. Your method needs to return a string that says "none" if the 'modelYear' parameter does not indicate a year when a Miata was produced (prior to 1989 or after the current year). Otherwise return "pop-up headlights" if 'modelYear' was a year when those were produced, or "fixed headlights" if 'modelYear' was a year when those were produced. The tricky bit is that 'modelYear' could be indicated two different ways! For example, the model year 1998 could be indicated by the number 1998 OR by the number 98 (as an abbreviated version of 1998). Your program must work correctly using both model year styles. Look at the test data, as always! test2021_03_11_APP1SLHL_miataHeadlights(1982) → "none" test2021_03_11_APP1SLHL_miataHeadlights(1970) → "none" test2021_03_11_APP1SLHL_miataHeadlights(70) → "none" ...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