-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoreItem.java
More file actions
82 lines (67 loc) · 1.66 KB
/
StoreItem.java
File metadata and controls
82 lines (67 loc) · 1.66 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
81
82
/**
* @author Zachary Devore
* Date: 3/9/26
* Section: CSC 311-002
*/
public class StoreItem {
/** Unique id for each item in the store */
private int itemID;
/** Name of the item */
private String name;
/** Price for each item in the store */
private double price;
/** Quantity of each item in the store */
private int quantity;
/**
* Creates a new instance of StoreItem
* @param itemID
* @param price
* @param quantity
*/
public StoreItem(int itemID, String name, double price, int quantity) {
this.itemID = itemID;
this.name = name;
this.price = price;
this.quantity = quantity;
}
/**
* Getter for ItemID
* @return the ItemID of an item
*/
public int getItemID() {return this.itemID;}
/**
* Getter for name
* @return
*/
public String getName() {return this.name;}
/**
* Getter for price
* @return the price of an item
*/
public double getPrice() {return this.price;}
/**
* Getter for quantity
* @return The quantity of the items in the store
*/
public int getQuantity() {return this.quantity;}
/**
* set the itemID
* @param itemID
*/
public void setItemID(int itemID) {this.itemID = itemID;}
/**
* set the name
* @param name
*/
public void setName(String name) {this.name = name;}
/**
* set the price
* @param price
*/
public void setPrice(double price) {this.price = price;}
/**
* set the quantity
* @param quantity
*/
public void setQuantity(int quantity) {this.quantity = quantity;}
}