The value of ex can be computed as the power series

@MY_IMAGE_IN_STATEMENT@

where n! = 1 · 2 · 3 · … · n.

Write a program that computes ex using this formula. Of course, you can't compute an infinite sum. Just keep adding values until an individual summand (term) is less than a certain threshold. At each step, you need to compute the new term and add it to the total. Update these terms as follows:

term = term * x / n;

Follow the approach of the preceding two exercises, by implementing a class ExpApproximator. Its first guess should be 1.

Complete the following files:

### ExpCalculator.java

Use the following file:

ExpApproximatorTester.java

```public class ExpApproximatorTester
{
public static void main(String[] args)
{
double a = 1;
double epsilon = 0.25;
ExpApproximator approx = new ExpApproximator(a, epsilon);
System.out.println(approx.nextGuess());
System.out.println("Expected: 1");
System.out.println(approx.nextGuess());
System.out.println("Expected: 2");
System.out.println(approx.nextGuess());
System.out.println("Expected: 2.5");
System.out.println(approx.hasMoreGuesses());
System.out.println("Expected: true");
approx.nextGuess();
System.out.println(approx.hasMoreGuesses());
System.out.println("Expected: false");
}
}
```