-
Notifications
You must be signed in to change notification settings - Fork 0
/
Discount.java
59 lines (45 loc) · 1.04 KB
/
Discount.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
package cpsc4620;
public class Discount
{
private int DiscountID;
private String DiscountName;
private double Amount;
private boolean isPercent;
public Discount(int discountID, String discountName, double amount, boolean isPercent) {
DiscountID = discountID;
DiscountName = discountName;
Amount = amount;
this.isPercent = isPercent;
}
public Discount() {
}
public int getDiscountID() {
return DiscountID;
}
public String getDiscountName() {
return DiscountName;
}
public double getAmount() {
return Amount;
}
public boolean isPercent() {
return isPercent;
}
public void setDiscountID(int discountID) {
DiscountID = discountID;
}
public void setDiscountName(String discountName) {
DiscountName = discountName;
}
public void setAmount(double amount) {
Amount = amount;
}
public void setPercent(boolean isPercent) {
this.isPercent = isPercent;
}
@Override
public String toString() {
return "DiscountID=" + DiscountID + " | " + DiscountName + ", Amount= " + Amount
+ ", isPercent= " + isPercent;
}
}