MathWorks interview question

Object oriented design for chess game