Toast Inc interview question

A moderate OOP design problem