Code written in C#. Please do not change the namespace, class or method signatures. Both method must be testable fully on own, that is, So do not add any new helper methods in the ​RootFinding​ class....

1 answer below »
This is a C# assignment for my intro to C# class.The template and test cases are attached in the visual studio file. Please write the code in that file. The instructions are in the PDF


Code written in C#. Please do not change the namespace, class or method signatures. Both method must be testable fully on own, that is, So do not add any new helper methods in the ​RootFinding​ class. Note that both methods are static methods. All your helper methods for the functions must go in the ​RootFindingTests​ class. https://en.wikipedia.org/wiki/Bisection_method https://en.wikipedia.org/wiki/Bisection_method https://en.wikipedia.org/wiki/Secant_method The starter code and test cases given is in the Visual Studio file attached. https://en.wikipedia.org/wiki/Secant_method
Answered Same DayOct 28, 2021

Answer To: Code written in C#. Please do not change the namespace, class or method signatures. Both method must...

Arun Shankar answered on Oct 29 2021
131 Votes
//Student name:
//Student number:
using System;
namespace Lab7
{
public class Program
{
static void Main()
{
//You could mainly use unit tests for testing.
}
}
public class RootFinding
{
// Delegate for any function whose root we want to find
public delegate double Function(double x);
///
/// Finds a root of f() using the Bisection method.
///

/// A delegate representing the function f to find the root of.
/// Left side of (a, b) that brackets a root.
/// Right side of (a, b) that brackets a root. b is greater than a.
/// The desired accuracy.
/// Returns the calculated root. If a root cannot be found, double.NaN is returned.
///
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here