-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStudent.java
81 lines (53 loc) · 1.39 KB
/
Student.java
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package oodp;
import javax.swing.*;
public class Student implements Customer{
public Student(String id, String password, int point,int coupon){
this.id=id;
this.password=password;
this.point= point;
this.coupon = coupon;
}
public String id;
private String password;
private int point;
private int coupon;
public void PaymentPoint(Menu selected){
//결제 회원(Student)의 정보와, 결제하고자 하는 물품의 정보를 받아옴
//포인트 이용
if (point >= selected.menuPrice)
{
point-=selected.menuPrice;
//Sales_Management(selected);
}else{
//포인트 부족
JOptionPane.showMessageDialog(null, "포인트가 부족합니다.");
}
}
public int getPoint(){
return this.point;
}
public void setPoint(int point){
this.point = point;
}
public int getCoupon(){
return this.coupon;
}
public void setCoupon(int coupon){
this.coupon = coupon;
}
public int useCoupon(){
if(this.coupon == 0)
return -1;
this.coupon--;
return this.coupon;
}
public String getId(){
return this.id;
}
public void setIdOutsider(){
this.id="Outsider";
}
public String getPassword(){
return this.password;
}
}