Show the modifications needed to add exponentiation to the class Calculator in Listing 9.12. Use ^ to indicate the exponentiation operator and the method Math.pow to perform the computation.
What will be an ideal response?
```
case '^': // THIS IS NEW CODE
answer = Math.pow(n1, n2);
break;
```
You might also like to view...
A program may change its response to a signal
A. at any time B. only at the start of the program
The disciplines of business, communications, and social sciences tend to prefer which writing style?
A) MLA B) Turabian C) APA D) Chicago
Like a table, a web page form contains a series of columns and column headings.
Answer the following statement true (T) or false (F)
Which of the following is NOT a question a CISO should be prepared to answer before beginning the process of designing, collecting, and using performance measurements, according to Kovacich?
A. Why should these measurements be collected? B. Where will these measurements be collected? C. What affect will measurement collection have on efficiency? D. Who will collect these measurements?