Question: QT C++ 2 Suppose that a class named RainXml would be used to generate the XML text for all the rain data. class RainXml public:

QT C++
2 Suppose that a class named RainXml would be used to generate the XML text for all the rain data. class RainXml public: RainXml (); RainXml getInstance (); Qstring writeroXml (/*passing rain data*/); privare: RainXml instance; bool checkstationcode (QString stn) const; QRegularExpression re; \}; This class is supposed to be implemented using a singleton design pattern. 2.2.1 The class definition code provided above does not correctly implement the classic singleton design pattern. Correct it so that it does. You are not expected to indicate the container that is used to pass rain data. 2.2.2 Would you agree with the decision to make this class use the singleton design pattern? Explain your reason clearly and persuasively; note that marks are only allocated for the reasoning. (2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
