IXL Learning interview question

A basic OOD design / coding question