-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct-temp.java
47 lines (41 loc) · 1.06 KB
/
Product-temp.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
/**
* This class contains information of products in store.
*
* @author Liu
* @version 1
*/
public class Product
{
// instance variables - replace the example below with your own
public String pname;
public String category;
public int price;
public String provider;
public String stock;
public int shelflife;
public int arriveDate;
/**
* Constructor for objects of class Product
*/
public Product()
{
// initialise instance variables
this.pname = "";
this.category = "";
this.price = 0;
this.provider = "";
this.stock = "";
this.shelflife = 0;
this.arriveDate = 2000/01/01;
}
public Product(String name, String category, int price, String provider, String stock, int shelflife)
{
this.pname = pname;
this.category = category;
this.price = price;
this.provider = provider;
this.stock = stock;
this.shelflife = shelflife;
this.arriveDate = arriveDate;
}
}