Anonymous interview question

Basic oops, prime number program