forked from AlexTheaker04/DCSS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditChemicalTable.java
More file actions
116 lines (94 loc) · 2.97 KB
/
editChemicalTable.java
File metadata and controls
116 lines (94 loc) · 2.97 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package application;
/*
* Date: 1/7/2021
* Title: addChemicalTable.
* Author: Andrey Zinovyev.
* Description: A class that will add items to the table.
*/
public class editChemicalTable {
// Private string variables.
private String chemicalName, chemicalFormula, dateOfEntry, dateOfExpiry;
// Private double variables.
private double chemicalMass, chemicalVolume;
// Create a blank table.
public editChemicalTable() {
// Default Values.
this.chemicalName = "";
this.chemicalMass = 0;
this.chemicalVolume = 0;
this.chemicalFormula = "";
this.dateOfEntry = "";
this.dateOfExpiry = "";
}
/** @author: Andrey Zinovyev.
* @date: 1/7/2021.
*
* editChemicalTable() is the method responsible for getting and setting the values in the text fields.
*
* @param String chemicalName: Can be retrieved from other classes.
* double chemicalMass: Can be retrieved from other classes.
* double chemicalVolume: Can be retrieved from other classes.
* String chemicalFormula: Can be retrieved from other classes.
* String dateOfEntry: Can be retrieved from other classes.
* String dateOfExpiry: Can be retrieved from other classes.
*
*/
public editChemicalTable(String chemicalName, double chemicalMass, double chemicalVolume, String chemicalFormula,
String dateOfEntry, String dateOfExpiry) {
// Pass in the values.
this.chemicalName = chemicalName;
this.chemicalMass = chemicalMass;
this.chemicalVolume = chemicalVolume;
this.chemicalFormula = chemicalFormula;
this.dateOfEntry = dateOfEntry;
this.dateOfExpiry = dateOfExpiry;
}
// Chemical Name getter.
public String getChemicalName() {
return chemicalName;
}
// Chemical Name setter.
public void setChemicalName(String chemicalName) {
this.chemicalName = chemicalName;
}
// Chemical Mass getter.
public double getChemicalMass() {
return chemicalMass;
}
// Chemical Mass setter.
public void setChemicalMass(double chemicalMass) {
this.chemicalMass = chemicalMass;
}
// Chemical Volume getter.
public double getChemicalVolume() {
return chemicalVolume;
}
// Chemical Volume setter.
public void setChemicalVolume(double chemicalVolume) {
this.chemicalVolume = chemicalVolume;
}
// Chemical Formula getter.
public String getChemicalFormula() {
return chemicalFormula;
}
// Chemical Formula setter.
public void setChemicalFormula(String chemicalFormula) {
this.chemicalFormula = chemicalFormula;
}
// Date of Entry getter.
public String getDateOfEntry() {
return dateOfEntry;
}
// Date of Entry setter.
public void setDateOfEntry(String dateOfEntry) {
this.dateOfEntry = dateOfEntry;
}
// Date of Expiry getter.
public String getDateOfExpiry() {
return dateOfExpiry;
}
// Date of Expiry setter.
public void setDateOfExpiry(String dateOfExpiry) {
this.dateOfExpiry = dateOfExpiry;
}
}