summaryrefslogtreecommitdiff
path: root/src/function/Grade2.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/function/Grade2.java')
-rwxr-xr-xsrc/function/Grade2.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/function/Grade2.java b/src/function/Grade2.java
new file mode 100755
index 0000000..2198d3a
--- /dev/null
+++ b/src/function/Grade2.java
@@ -0,0 +1,17 @@
+package function;
+
+public class Grade2 extends Function {
+
+ private double a, b, c;
+
+ public Grade2(double a, double b, double c) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ }
+
+ public double getY(double x) {
+ return a*Math.pow(x, 2)+b*x+c;
+ }
+
+}