-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathGrocery.java
More file actions
40 lines (31 loc) · 851 Bytes
/
Grocery.java
File metadata and controls
40 lines (31 loc) · 851 Bytes
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
import java.text.SimpleDateFormat;
public class Grocery {
private String name;
private Double price;
private SimpleDateFormat expirationDate;
public Grocery() {
}
public Grocery(String name, Double price, SimpleDateFormat expirationDate) {
this.name = name;
this.price = price;
this.expirationDate = expirationDate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
public SimpleDateFormat getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(SimpleDateFormat expirationDate) {
this.expirationDate = expirationDate;
}
}