IBM interview question

OOP basics