sample tests passing for 488A
passing on all tests, added the same program written in Java