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

 

jebbert@volusia.k12.fl.us > test2024_09_19_APP1SLHL_belowTotal
prev  |  next  |  chance

Write a method that accepts three integer parameters, 'a', 'b', and 'max' and a boolean parameter 'twice'. If the boolean parameter 'twice' is true, it means that the actual maximum value is twice the value of 'max'. Otherwise the actual maximum value is just 'max'. Return true if the sum of 'a' and 'b' is less than the actual maximum value as defined above. Return false otherwise.


test2024_09_19_APP1SLHL_belowTotal(5, 7, 40, false) → true
test2024_09_19_APP1SLHL_belowTotal(8, 10, 15, false) → false
test2024_09_19_APP1SLHL_belowTotal(8, 10, 15, true) → true

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

public boolean test2024_09_19_APP1SLHL_belowTotal(int a, int b, int max, boolean twice) { }

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: 230

Copyright Nick Parlante 2017 - privacy