-
Notifications
You must be signed in to change notification settings - Fork 1
/
Item.java
85 lines (78 loc) · 1.33 KB
/
Item.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
82
83
84
85
import java.io.Serializable;
/**
*
* @author akshyta, anushika
* This class represents the items stored in the warehouses and stores
*
*/
public class Item implements Serializable
{
private String name;
private Category ParentCategory;
private Subcategory ParentSubcategory;
private Cost cost=new Cost();
/**
*
* @param n
* @param pc
* @param ps
* @param D
* @param H
* @param K
*
* The following is a contructor for Item class
*/
public Item(String n, Category pc, Subcategory ps,int D,int H,int K)
{
name = n;
ParentCategory=pc;
ParentSubcategory=ps;
cost.update_D(D);
cost.update_H(H);
cost.update_K(K);
}
/**
*
* Getter function
* @return name of the item
*/
public String getName()
{
return this.name;
}
/**
*
* Setter function
* sets the name of the item
*/
public void setName(String n)
{
name=n;
}
public Category getCategory()
{
return ParentCategory;
}
/**
*
* Getter function
* @return subcategory of the item
*/
public Subcategory getSubcategory()
{
return ParentSubcategory;
}
public Cost get_cost()
{
return this.cost;
}
/**
*
* Getter function
* @return EOQ of the item
*/
public int get_EOQ()
{
return this.cost.get_EOQ();
}
}