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

Variable Index

 o f
The function to which the line is secant.
 o slope
The slope of the line
 o xOne
The x-coordinate of the first point on the curve used to determine the line
 o xTwo
The x-coordinate of the second point on the curve used to determine the line
 o yOne
The y-coordinate of the first point on the curve used to determine the line
 o yTwo
The y-coordinate of the second point on the curve used to determine the line

Constructor Index

 o EDU.emporia.mathbeans.SecantLine()
No-argument constructor

Method Index

 o functionValue(double)
Gives the y-coordinate of the point on the secant line with the indicated x-coordinate.
 o getF()
Gets the function used to determine the secant line.
 o getSlope()
Gets the value of the slope of the secant line
 o getXOne()
Sets the x-coordinate of the first point used to construct the secant line
 o getXTwo()
Gets the x-coordinate of the second point used to construct the secant line
 o setF(MathFunction)
Sets the function used to determine the secant line.
 o setXOne(double)
Sets the x-coordinate of the first point used to construct the secant line
 o setXTwo(double)
Sets the x-coordinate of the second point used to construct the secant line
 o updateSlope()
Updates the value of the slope to reflect any changes made in the points or in the definition of f.

Variables

 o f
protected EDU.emporia.mathtools.MathFunction f
The function to which the line is secant.

 o slope
protected double slope
The slope of the line

 o xOne
protected double xOne
The x-coordinate of the first point on the curve used to determine the line

 o xTwo
protected double xTwo
The x-coordinate of the second point on the curve used to determine the line

 o yOne
protected double yOne
The y-coordinate of the first point on the curve used to determine the line

 o yTwo
protected double yTwo
The y-coordinate of the second point on the curve used to determine the line

Constructors

 o SecantLine
public SecantLine()
No-argument constructor

Methods

 o 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
 o 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.
 o getSlope
public double getSlope()
Gets the value of the slope of the secant line

Returns:
The slope of the secant line
 o 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
 o 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
 o 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.
 o 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
 o 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
 o 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