Simple Java application to simulate a machine that checks lottery tickets