-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathGrocery.java
More file actions
39 lines (30 loc) · 762 Bytes
/
Grocery.java
File metadata and controls
39 lines (30 loc) · 762 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
import java.text.SimpleDateFormat;
public class Grocery {
private String name;
private Double price;
private SimpleDateFormat date;
private final String food = "Food";
public Grocery(String name, Double price, SimpleDateFormat date) {
this.name = name;
this.price = price;
this.date = date;
}
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 getDate() {
return date;
}
public void setDate(SimpleDateFormat date) {
this.date = date;
}
}