1) Class DoubleTrouble contains a static integer member calledhowMuch. Write the class definition and implementation code thatinitializes howMuch, increments howMuch each time an object of theDoubleTrouble type is constructed, and decrements howMuch each timean object of the DoubleTrouble type is destroyed.
Solution
//This is in C++class DoubleTrouble{ public: static int howMuch; DoubleTrouble(){ howMuch++; } ~DoubleTrouble(){ howMuch–; }
OR
OR