-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNutrient.java
67 lines (52 loc) · 1.7 KB
/
Nutrient.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package hw3;
//Sahib Singh
//AndrewId: sahibsin
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
/*
* A Java bean with private member variables as properties, and public getters and setters. It has a default constructor
that initializes all string properties to empty strings. Its non-default constructor initializes nutrientCode,
nutrientName, and nutrientUom properties.
*/
public class Nutrient {
StringProperty nutrientCode = new SimpleStringProperty();
StringProperty nutrientName = new SimpleStringProperty();
StringProperty nutrientUom = new SimpleStringProperty();
Nutrient(){
this.nutrientCode.set("");
this.nutrientName.set("");
this.nutrientUom.set("");
}
Nutrient(String nutrientCode, String nutrientName, String nutrientUom){
this.nutrientCode.set(nutrientCode);
this.nutrientName.set(nutrientName);
this.nutrientUom.set(nutrientUom);
}
public String getNutrientCode() {
return nutrientCode.get();
}
public void setNutrientCode(StringProperty nutrientCode) {
this.nutrientCode = nutrientCode;
}
public String getNutrientName() {
return nutrientName.get();
}
public void setNutrientName(StringProperty nutrientName) {
this.nutrientName = nutrientName;
}
public String getNutrientUom() {
return nutrientUom.get();
}
public void setNutrientUom(StringProperty nutrientUom) {
this.nutrientUom = nutrientUom;
}
public final StringProperty nutrientCodeProperty() {
return nutrientCode;
}
public final StringProperty nutrientNameProperty() {
return nutrientName;
}
public final StringProperty nutrientUomProperty() {
return nutrientUom;
}
}