Rectangle* CreateProductRectangle(const int& posX0, const int& posY0, const int& posX1, const int& posY1, const int& id) override{Р return new Rectangle2(posX0, posY0, posX1, posY1, id);;Р }Р // Hidden interfacesР virtual Picture* CreateProductPicture(const int& id) override { return nullptr; }Р?public:Р static ConcreteFactory2* CreateInstance()?{Р if (nullptr == _pInstance){Р _pInstance = new ConcreteFactory2();Р }Р ++_count;Р return _pInstance;Р }Р?protected:Р static?ConcreteFactory2*?_pInstance;Р static?int _count;Р?};Р} // namespace gesР4.1.3. 主函数中的实现代码Р_pFactory = AbstractFactory::CreateInstance();Р?……Р_pFactory = ConcreteFactory2::CreateInstance();Р ……Р_pFactory = ConcreteFactory1::CreateInstance();Р?……Р4.posite设计模式设计直线、符号、字符串、方框及复合图形,画出类结构图,写出类结构图对应的代码原型,并写出相应的主函数中的实现代码。Р?4.2.1 类结构图