-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass Item
More file actions
52 lines (41 loc) · 1.04 KB
/
class Item
File metadata and controls
52 lines (41 loc) · 1.04 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
public class Item {
public int itemId;
public String name;
public String producer;
public double price;
public Item(int itemId , String name , String producer , double price){
this.itemId = itemId;
this.name = name;
this.producer = producer;
this.price = price;
}
public int getItemId(){
return itemId;
}
public void setItemId(int itemId){
this.itemId = itemId;
}
public String getName(){
return name;
}
public void setName(String name){
this.name = name;
}
public String getProducer(){
return producer;
}
public void setProducer(String producer){
this.producer = producer;
}
public double getPrice(){
return price;
}
public void setPrice(double price){
this.price = price;
}
public String toString(){
String toStr = "" ;
toStr ="itemId: " + itemId + " name: " + name + " producer: " + producer + " price: " + price;
return toStr;
}
}