MDA interview question

java code review