X15: inOrder

Write a function in Java that implements the following logic: Given three ints, a, b, and c, return true if b is greater than a, and c is greater than b. However, with the exception that if bOk is true, b does not need to be greater than a.

Your Answer:

x
 
1
public boolean inOrder(int a, int b, int c, boolean bOk)
2
{
3
    
4
}
5

Feedback

Your feedback will appear here when you check your answer.