-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrink.java
More file actions
50 lines (37 loc) · 858 Bytes
/
Copy pathDrink.java
File metadata and controls
50 lines (37 loc) · 858 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
43
44
45
46
47
48
49
50
package java0907_api.prob;
public class Drink {
private String name;
private int price;
private int count;
public Drink() {
}
public Drink(String name, int price, int count) {
super();
this.name = name;
this.price = price;
this.count = count;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public void display() {
System.out.println("*****음료수 주문****");
System.out.printf("고객님은 음료수 %s,%d개를 주문하셨습니다.\n", name, count);
System.out.printf("지불하실 금액은 %d원 입니다.\n\n", price * count);
}
}// end Drink