-
Notifications
You must be signed in to change notification settings - Fork 686
Expand file tree
/
Copy pathMenuItem.java
More file actions
49 lines (38 loc) · 1.04 KB
/
MenuItem.java
File metadata and controls
49 lines (38 loc) · 1.04 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
package org.launchcode;
import java.time.LocalDate;
public class MenuItem {
private String name;
private String description;
private double price;
private String category;
private final LocalDate dateAdded;
public MenuItem(String name, String description, double price, String category) {
this.name = name;
this.description = description;
this.price = price;
this.category = category;
this.dateAdded = LocalDate.now();
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
//Only getter for dateAdded
public LocalDate getDateAdded() {
return dateAdded;
}
}