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

 

canGoParty


Your parents have created some (rather strict) rules for you. You are allowed to go to the party if you satisfy the following conditions:

1. you have finished your homework, and,
2. your marks in Math are above 80, or in case your marks in Math are not above 80, you have cleaned your room.
Define a function that when passed the required information, returns true if you are allowed to go to the party, false otherwise.

canGoParty(true, 70, false) → false
canGoParty(true, 80, false) → false
canGoParty(true, 81, false) → true

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

boolean canGoParty(boolean homeworkDone, int mathMarks, boolean cleanedRoom) { }

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: 2 Post-solution available

Copyright Nick Parlante 2017 - privacy