I have a code using encapsulation and composition with 3 classes in C++. In my code I have to create the objects in a static way. I want to create the objects in a dynamic way.