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

 

canWatchMovie


Create a method canWatchMovie that will take in: Your age (int) Whether you have parent permission (boolean) Rules: If age is 18 or older, return true. If age is between 13 and 17 (inclusive) and you have parent permission, return true. Otherwise, return false.


canWatchMovie(18, true) → true
canWatchMovie(16, true) → true
canWatchMovie(16, false) → false

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

public boolean canWatchMovie(int age, boolean hasPermission) }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy