Question: Java Please help and show your code. Book Question This assignment does not exactly match the one in the textbook on which it is based.

Java Please help and show your code.

Java Please help and show your code. Book Question This assignment does

Book Question

not exactly match the one in the textbook on which it is

This assignment does not exactly match the one in the textbook on which it is based. I don't want any counter-controlled loops in your solution. Your solution should be able to detect when the accuracy isn't improving and then display the results of the work (as outlined below): Look at Programming Exercise **5.25 in the textbook on approximating the value of it. It is described as: TT = 4 (1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ... + (-1)^(i+1)/(21-1) ) Notice that Java has the best possible value of n that can be stored as a type double available as Math.pl (part of the java.lang package). See how close you can get to the best value of n using a loop with the above technique. Notice that the above implies you are testing the value of your own estimate as it approaches the best value available in Java (as a type double). This would not be a pre-determined, counter-controlled loop. You are testing the results (sentinel- controlled) until you reach a value with the minimum discrepancy against Math.Pl. If done correctly, you can get full credit but you will have trouble. The point of this assignment is to illustrate the difficulty of implementing some pure-math algorithms with digital computing resources. The goal is to have you experiment and notice the results of your various While gaining the credit is easy, getting best results is not. How many iterations did it take? How far off was your estimated value. Attach the source code (as a single dot java file) and include in the output your calculated value, the number of iterations it took and the discrepancy. **5.25 (Compute 7) You can approximate by using the following summation: it 1 T = 4/1 1 1 + 3 5 1 1 + 7 9 + + (-)+1 2i 1 11

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!