Write a Java program (meaning a method within class Main that iscalled from the method main) which
Question:
Write a Java program (meaning a method within class Main that iscalled from the method main) which implements the BisectionMethod for a fixed function. In our Programming Lab weimplemented a version in Python and passed a functionto bisectionMethod. We have not learned that for Java,yet, so you will implement it for a function of your choice.Suppose you choose Math.cos, then you should name your methodbisectionMethodCos. It will take as input
• a double a representing the left end point of theinterval
• and double b representing the right end point of the interval
It will output the root as a double. Use epsilon=0.0001as terminating conditional. Assume that there is a root in theprovided interval.
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch