public class Average extends BinaryExpression
Constructor and Description |
---|
Average(Expression first,
Expression second)
Initializes this average expression with the given two subexpressions.
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double x,
double y)
Evaluates this average expression at the given x- and y-coordinate.
|
String |
toString()
Returns a string representation of this average expression.
|
equals, evaluate, hashCode, toString
public Average(Expression first, Expression second)
first
- the first subexpression.second
- the second subexpression.public double evaluate(double x, double y)
evaluate
in class Expression
x
- the x-coordinate.y
- the y-coordinate.public String toString()