From 5dca7b0f4aed3ae3ba90cdf205ca38e9269cfb37 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 17 Mar 2015 19:10:07 +0100 Subject: Added javadoc --- Week7/src/polynomial/Term.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Week7/src/polynomial/Term.java') diff --git a/Week7/src/polynomial/Term.java b/Week7/src/polynomial/Term.java index b8d9f16..7cde927 100644 --- a/Week7/src/polynomial/Term.java +++ b/Week7/src/polynomial/Term.java @@ -8,6 +8,9 @@ import java.util.Scanner; * @author Sjaak Smetsers * @version 1.0 * @date 15-02-2012 + * + * @author Camil Staps, s4498062 + * @date 17-03-2015 */ public class Term { @@ -94,6 +97,8 @@ public class Term { /** * Standard implementation of equality + * @param may_be_term the object to check equality with + * @return true iff may_be_term represents the same term as this term */ @Override public boolean equals(Object may_be_term) { @@ -106,6 +111,11 @@ public class Term { } } + /** + * Apply a term to a concrete variable + * @param x the variable to apply the term to + * @return the result of the application of the term to x + */ public double apply(double x) { return coefficient * Math.pow(x, exponent); } -- cgit v1.2.3