-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
69 lines (55 loc) · 1.19 KB
/
Copy pathItem.java
File metadata and controls
69 lines (55 loc) · 1.19 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
//package AuctionHouse;
import java.util.ArrayList;
import java.util.HashMap;
public class Item
{
private int id;
private int startingPrice;
private String description;
private ArrayList<String> interestedUsers;
private String currentBidder;
private int currentBid;
public Item(int startingPrice, String description, int id)
{
this.id = id;
this.startingPrice = startingPrice;
this.description = description;
this.interestedUsers = new ArrayList<String>();
this.currentBidder = Constants.no_holder;
this.currentBid = startingPrice;
}
public void addUser(String username)
{
this.interestedUsers.add(username);
}
public int getId()
{
return id;
}
public int getStartingPrice() {
return startingPrice;
}
public String getDescription() {
return description;
}
public ArrayList<String> getInterestedUsers()
{
return interestedUsers;
}
public String getCurrentBidder()
{
return currentBidder;
}
public int getCurrentBid()
{
return currentBid;
}
public void setCurrentBidder(String currentBidder)
{
this.currentBidder = currentBidder;
}
public void setCurrentBid(int currentBid)
{
this.currentBid = currentBid;
}
}