Intel Corporation interview question

C++ encapsulation, inheritance and polymorphism