Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

Book Question

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

Develop knowledge of the Italian entrepreneurial business context.

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago