BlackRock interview question

encapsulation and Inheritance in C++.