-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGloceryItem.java
48 lines (38 loc) · 1.12 KB
/
GloceryItem.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
import java.io.Serializable;
import java.util.ArrayList;
public class GloceryItem implements Serializable{
protected int itemCode;
private String name;
private double price;
private double weight;
private String dateOfMan;
private String dateOfExp;
private String manufacturer;
private double discount;
public GloceryItem(int itemCode,String name, double price, double weight, String dateOfMan, String dateOfExp, String manufacturer,double discount) {
this.itemCode = itemCode;
this.name = name;
this.price = price;
this.weight = weight;
this.dateOfMan = dateOfMan;
this.dateOfExp = dateOfExp;
this.manufacturer = manufacturer;
this.discount = discount;
}
public int getItemCode() {
return itemCode;
}
public double getPrice() {
return price;
}
@Override
public String toString() {
return price + " : ";
}
public String getName() {
return name;
}
public double getDiscount() {
return discount;
}
}