Google interview question

Some OOP algorithms.