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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!