my favorite OOP interview problem