<p>Design a <code>Calculator</code> class. The class should provide the mathematical operations of addition, subtraction, multiplication, division, and exponentiation. It should also allow consecutive operations to be performed using method chaining. The <code>Calculator</code> class constructor should accept a number which serves as the initial value of <code>result</code>.</p>
<p>Your <fontface="monospace"><code>Calculator</code> </font>class should have the following methods:</p>
<ul>
<li><code>add</code> - This method adds the given number <code>value</code> to the <code>result</code> and returns the updated <code>Calculator</code>.</li>
<li><code>subtract</code> - This method subtracts the given number <code>value</code> from the <code>result</code> and returns the updated <code>Calculator</code>.</li>
<li><code>multiply</code> - This method multiplies the <code>result</code> by the given number <code>value</code> and returns the updated <code>Calculator</code>.</li>
<li><code>divide</code> - This method divides the <code>result</code> by the given number <code>value</code> and returns the updated <code>Calculator</code>. If the passed value is <code>0</code>, an error <code>"Division by zero is not allowed"</code> should be thrown.</li>
<li><code>power</code> - This method raises the <code>result</code> to the power of the given number <code>value</code> and returns the updated <code>Calculator</code>.</li>
<li><code>getResult</code> - This method returns the <code>result</code>.</li>
</ul>
<p>Solutions within <code>10<sup>-5</sup></code> of the actual result are considered correct.</p>
<li><code>actions[i]</code> is one of "Calculator", "add", "subtract", "multiply", "divide", "power", and "getResult"</li>
<li>First action is always "Calculator"</li>
<li>Last action is always "getResult"</li>