IBM interview question

OOP principles, asked me about encapsulation, inheritance etc.