about | help | code help+videos | done | prefs |
Write a method that determines how much you owe for damaged or lost laptop items. If you have a broken screen, it costs $150. A damaged keyboard costs $75. A missing cord costs $25. You might also have another problem, in which case the cost depends on the problem you have. The parameter 'otherProblem' is true if you have another problem, in which case 'costOther' is added to the total that you owe. All the other parameters should be obvious in their meaning. Look at the test data for examples. quiz2023_09_12_P1SLHL_laptopFine(false, true, true, true, 2) → 102 quiz2023_09_12_P1SLHL_laptopFine(false, false, true, false, 500) → 75 quiz2023_09_12_P1SLHL_laptopFine(true, true, true, false, 100) → 250 ...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