-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLottery.java
More file actions
80 lines (65 loc) · 1.59 KB
/
Copy pathLottery.java
File metadata and controls
80 lines (65 loc) · 1.59 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
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
public class Lottery{
//attributes
private short lotteryBox;
private String name;
private short price;
private int number;
private String gameNumber;
private short amount;
//constructor
public Lottery(short lotteryBox, String name, short price, int number, String gameNumber, short amount){
this.lotteryBox = lotteryBox;
this.name = name;
this.price = price;
this.number = number;
this.gameNumber = gameNumber;
this.amount = amount;
}
//set default values
public Lottery(){
this.lotteryBox = 0;
this.name = "";
this.price = 0;
this.number = 0;
this.gameNumber = "";
this.amount = 0;
}
//setters
public void setLotteryBox(short lotteryBox){
this.lotteryBox = lotteryBox;
}
public void setName(String name){
this.name = name;
}
public void setPrice(short price){
this.price = price;
}
public void setNumber(int number){
this.number = number;
}
public void setGameNumber(String gameNumber){
this.gameNumber = gameNumber;
}
public void setAmount(short amount){
this.amount = amount;
}
//getters
public short getLotteryBox(){
return lotteryBox;
}
public String getName(){
return name;
}
public short getPrice(){
return price;
}
public int getNumber(){
return number;
}
public String getGameNumber(){
return gameNumber;
}
public short getAmount(){
return amount;
}
}