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)
(18 points)
Write a program that first reads in a set of winning numbers. After that the program can be used to check lottery bets. Several bets can be checked. Design by yourself how to quit the program.
You may assume that all the input is numeric, actually integer numbers. Anyhow the values should be checked and errors reported. (It might be a good idea to program an auxiliary method to check the input numbers. Perhaps a method for reading whole Lotto row could be useful?)
(16 points)