Clairvoyant interview question

Logical reasoning. Java OOPS Pattern programming