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