NEC Corporation interview question

C++ polymorphism, Basic STL, Factory pattern