vsp
Class Trapezoid

java.lang.Object
  extended by vsp.Trapezoid

public class Trapezoid
extends java.lang.Object

Trapezoid function

Author:
Jan Tichava

Field Summary
private static int AREA
           
private  double height
           
private  Params params
           
 
Constructor Summary
Trapezoid(Params params)
          Create new trapezoid
 
Method Summary
private  double function(double x)
          Get function value in 'x'
 double functionValue(double x)
          Get function value in 'x'
 double getHeight()
          Get trapezoid height
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AREA

private static final int AREA
See Also:
Constant Field Values

params

private Params params

height

private double height
Constructor Detail

Trapezoid

public Trapezoid(Params params)
Create new trapezoid

Parameters:
params - parametrs from command line
Method Detail

functionValue

public double functionValue(double x)
Get function value in 'x'

Parameters:
x - desired value
Returns:
function value

function

private double function(double x)
Get function value in 'x'

Parameters:
x - desired value
Returns:
function value

getHeight

public double getHeight()
Get trapezoid height

Returns:
the height