-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMenu.java
More file actions
42 lines (33 loc) · 924 Bytes
/
Menu.java
File metadata and controls
42 lines (33 loc) · 924 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
41
42
package domain;
public class Menu {
private final int number;
private final String name;
private final Category category;
private final int price;
public Menu(final int number, final String name, final Category category, final int price) {
this.number = number;
this.name = name;
this.category = category;
this.price = price;
}
public int getNumber() {
return number;
}
public String getName() {
return name;
}
public Category getCategory() {
return category;
}
public int getPrice() {
return price;
}
public boolean isEqualNumber(int number){
return this.number == number;
}
public boolean isThisCake(){ return this.category==Category.CAKE;}
@Override
public String toString() {
return category + " " + number + " - " + name + " : " + price + "원";
}
}