(18 points)
Implement the juice automata as a class JuiceAutomata. (The constructor and accessors interpret negative parameter values as zero.)
Program also a main method to show, how the constructor and the methods are used.
(16 points)
The program is given an integer one by one, and the program finds out, whether that integer is to be found in the array. You must use the Binary Search for finding the answers. All the input numbers should be in the range 1-100000, except the number 0, which ends all the questioning.
You may assume that all the input are valid integers, but their values must be checked and possible must be errors reported.
(16 points)