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

 

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

Write a method that accepts three boolean variables and then returns a string showing the values of those variables and various combinations of AND and OR of those variables. When the return string has a blank space it is only a single blank space (never more than one blank space in a row)


nov18_2016_SLHL_truthiness(true, true, true) → "b1=true, b2=true, b3=true, (b1 AND b2)=true, (b1 OR b2)=true, (b1 AND b2 AND b3)=true"
nov18_2016_SLHL_truthiness(true, false, true) → "b1=true, b2=false, b3=true, (b1 AND b2)=false, (b1 OR b2)=true, (b1 AND b2 AND b3)=false"
nov18_2016_SLHL_truthiness(false, false, true) → "b1=false, b2=false, b3=true, (b1 AND b2)=false, (b1 OR b2)=false, (b1 AND b2 AND b3)=false"

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

public String nov18_2016_SLHL_truthiness(boolean b1, boolean b2, boolean b3) { }

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

Copyright Nick Parlante 2017 - privacy