-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCartVirtualItem.java
More file actions
68 lines (61 loc) · 1.37 KB
/
Copy pathCartVirtualItem.java
File metadata and controls
68 lines (61 loc) · 1.37 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
class CartVirtualItem {
private byte type = (byte)0;
private String name = "";
private int amount = 0;
private boolean isSpecialVersion = false;
/**
* constructor that sets up the type, name, and amount
*
* @param typ
* @param name
* @param amt
* @boolean spec
*/
public CartVirtualItem(byte typ, String nam, int amt, boolean spec) {
type = typ;
name = nam;
amount = amt;
isSpecialVersion = spec;
}
/**
* getter for the type
*
* @return byte type
*/
public byte getType() {
return type;
}
/**
* getter for the name
*
* @return String name
*/
public String getName() {
return name;
}
/**
* getter for the amount of the CartVirtualItem
*
* @return int amount
*/
public int getAmount() {
return amount;
}
/**
* setter for the amount in the CartVirtualItem
* the amount is the only variable that needs to change after the constructor
*
* @param int newAmt
*/
public void setAmount(int newAmt) {
amount = newAmt;
}
/**
* getter for the whwther the CartVirtualItem is the special version or not
*
* @return boolean isSpecialVersion
*/
public boolean isSpecial() {
return isSpecialVersion;
}
}