Someone can vote when they are 18 or older AND registered. Return true only when both hold.
boolean canVote(int age, boolean registered)
Examples
There are also 3 hidden tests you can't see. Solve the problem, not the examples.