diff options
Diffstat (limited to 'src/function/SquareRoot.java')
-rwxr-xr-x | src/function/SquareRoot.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/function/SquareRoot.java b/src/function/SquareRoot.java new file mode 100755 index 0000000..0fbbb6c --- /dev/null +++ b/src/function/SquareRoot.java @@ -0,0 +1,17 @@ +package function;
+
+public class SquareRoot extends Function {
+
+ private double a, b, c;
+
+ public SquareRoot(double a, double b, double c) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ }
+
+ public double getY(double x) {
+ return a*Math.pow(b*x, 0.5)+c;
+ }
+
+}
|