/Users/20800/Desktop/IA_Final_Submission_000307-0050/Product/IA_Netbeans_Project/src/mainPackage/Function.java
 1 /*
 2  * To change this license header, choose License Headers in Project Properties.
 3  * To change this template file, choose Tools | Templates
 4  * and open the template in the editor.
 5  */
 6 package mainPackage;
 7 
 8 import java.util.ArrayList;
 9 
10 /**
11  *
12  * @author 20800
13  */
14 public class Function {
15     private FunctionSettings functionSettings; //Function aggregates the functionSettings object
16     private double a = 1.0; //a, b, h, and k are the common mathematical symbols for these transformation variables
17     private double b = 1.0;
18     private double h = 0.0;
19     private double k = 0.0;
20     private ArrayList<XYPoint> tableOfValues = new ArrayList<XYPoint>(); //Function aggregates an ArrayList of XYPoints
21     
22     public Function(){
23         
24     }
25    
26     
27     public Function(FunctionSettings f){ // constructor specifically made to set the default values of functionSettings for each instance of Function
28         functionSettings = new FunctionSettings();
29     }
30     
31     public Function(FunctionSettings functionSettings, double a, double b, double h, double k, ArrayList<XYPoint> tableOfValues){
32         this.functionSettings = functionSettings;
33         this.a = a;
34         this.b = b;
35         this.h = h;
36         this.k = k;
37         this.tableOfValues = tableOfValues;
38     }
39     
40     public FunctionSettings getFunctionSettings() { //retrieves values
41         return functionSettings;
42     }
43     
44     public double getA() {
45         return a;
46     }
47     
48     public double getB() {
49         return b;
50     }
51     
52     public double getH() {
53         return h;
54     }
55     
56     public double getK() {
57         return k;
58     }
59     
60     public ArrayList <XYPoint> getTableOfValues() {
61         return tableOfValues;
62     }
63     
64     public void setFunctionSettings(FunctionSettings functionSettings) { // sets values
65         this.functionSettings = functionSettings;
66     }
67     
68     public void setA(double a) {
69         this.a = a;
70     }
71     
72     public void setB(double b) {
73         this.b = b;
74     }
75     
76     public void setH(double h) {
77         this.h = h;
78     }
79     
80     public void setK(double k) {
81         this.k = k;
82     }
83     
84     public void setTableOfValues(ArrayList<XYPoint> tableOfValues){
85         this.tableOfValues = tableOfValues;
86     }
87 }
88