This is probably the worst prof I have ever had so I have no idea what to do to make this program. Help would be greatly appreciated.
Specifications:
Function poly(given x, z, a, b, c; returns y)
Function roots(given degree, left, right, z, a, b, c, &secondRoot; returns estimateOfRoot)
Note: The roots function has a switch structure to process either a polynomial of degree 2 or 3 with case 2: to handle quadratic formula that returns two roots, one through the normal return statement via estimateOfRoot and a second root through the reference parameter &secondRoot; and with case 3: to handle the cubic polynomial with the incremental search technique.
Your main module should drive the roots function with PIE from the user for degree, coefficients, interval limits, and step size until the user decides to quit the program with a value of -1 for degree, that is, an input sentinel of -1 to terminate a loop in the main module that drives your Polynomial Roots Problem.
Specifications:
Function poly(given x, z, a, b, c; returns y)
Function roots(given degree, left, right, z, a, b, c, &secondRoot; returns estimateOfRoot)
Note: The roots function has a switch structure to process either a polynomial of degree 2 or 3 with case 2: to handle quadratic formula that returns two roots, one through the normal return statement via estimateOfRoot and a second root through the reference parameter &secondRoot; and with case 3: to handle the cubic polynomial with the incremental search technique.
Your main module should drive the roots function with PIE from the user for degree, coefficients, interval limits, and step size until the user decides to quit the program with a value of -1 for degree, that is, an input sentinel of -1 to terminate a loop in the main module that drives your Polynomial Roots Problem.
Comment