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