Pregunta de entrevista de Perficient

Java OOP fundamentals, Projects, 1 LC Easy/Medium question