Class EDU.emporia.mathbeans.SecantLine
All Packages Class Hierarchy This Package Previous Next Index
Class EDU.emporia.mathbeans.SecantLine
Object
|
+----MathFunction
|
+----EDU.emporia.mathbeans.SecantLine
- public class SecantLine
- extends MathFunction
Generates a MathFunction corresponding to a secant line between two points of the
specified curve.
- Version:
- 1.0
- Author:
- Joe Yanik
- Since:
- 7/7/00
-
f
- The function to which the line is secant.
-
slope
- The slope of the line
-
xOne
- The x-coordinate of the first point on the curve used to determine the line
-
xTwo
- The x-coordinate of the second point on the curve used to determine the line
-
yOne
- The y-coordinate of the first point on the curve used to determine the line
-
yTwo
- The y-coordinate of the second point on the curve used to determine the line
-
EDU.emporia.mathbeans.SecantLine()
- No-argument constructor
-
functionValue(double)
- Gives the y-coordinate of the point on the secant line with the indicated x-coordinate.
-
getF()
- Gets the function used to determine the secant line.
-
getSlope()
- Gets the value of the slope of the secant line
-
getXOne()
- Sets the x-coordinate of the first point used to construct the secant line
-
getXTwo()
- Gets the x-coordinate of the second point used to construct the secant line
-
setF(MathFunction)
- Sets the function used to determine the secant line.
-
setXOne(double)
- Sets the x-coordinate of the first point used to construct the secant line
-
setXTwo(double)
- Sets the x-coordinate of the second point used to construct the secant line
-
updateSlope()
- Updates the value of the slope to reflect any changes made in the points or in the
definition of f.
f
protected EDU.emporia.mathtools.MathFunction f
- The function to which the line is secant.
slope
protected double slope
- The slope of the line
xOne
protected double xOne
- The x-coordinate of the first point on the curve used to determine the line
xTwo
protected double xTwo
- The x-coordinate of the second point on the curve used to determine the line
yOne
protected double yOne
- The y-coordinate of the first point on the curve used to determine the line
yTwo
protected double yTwo
- The y-coordinate of the second point on the curve used to determine the line
SecantLine
public SecantLine()
- No-argument constructor
functionValue
public double functionValue(double a)
- Gives the y-coordinate of the point on the secant line with the indicated x-coordinate.
- Parameters:
- a - The indicated x-coordinate
- Returns:
- The y-coordinate of the point on the secant line with the indicated x-coordinate.
- Overrides:
- functionValue in class MathFunction
getF
public EDU.emporia.mathtools.MathFunction getF()
- Gets the function used to determine the secant line.
- Returns:
- The function used to determine the secant line.
getSlope
public double getSlope()
- Gets the value of the slope of the secant line
- Returns:
- The slope of the secant line
getXOne
public double getXOne()
- Sets the x-coordinate of the first point used to construct the secant line
- Returns:
- The x-coordinate of the first point used to construct the secant line
getXTwo
public double getXTwo()
- Gets the x-coordinate of the second point used to construct the secant line
- Returns:
- The x-coordinate of the second point used to construct the secant line
setF
public void setF(MathFunction f)
- Sets the function used to determine the secant line.
- Parameters:
- f - The function used to determine the secant line.
setXOne
public void setXOne(double xOne)
- Sets the x-coordinate of the first point used to construct the secant line
- Parameters:
- xOne - The x-coordinate of the first point used to construct the secant line
setXTwo
public void setXTwo(double xTwo)
- Sets the x-coordinate of the second point used to construct the secant line
- Parameters:
- xTwo - The x-coordinate of the second point used to construct the secant line
updateSlope
public void updateSlope()
- Updates the value of the slope to reflect any changes made in the points or in the
definition of f.
All Packages Class Hierarchy This Package Previous Next Index