148k views
1 vote
Write the definition of a function issenior, that receives an integer parameter and returns true if the parameter 's value is greater or equal to 65, and false otherwise.

User MattJ
by
7.4k points

1 Answer

4 votes
private boolean issenior( int age )
{
return( ( age >= 65 ) ? true : false; )
// I enjoy the ternary operator!
}
User Jameslk
by
8.3k points