Autodesk interview question

OOP, algorithm