-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
58 lines (42 loc) · 1.17 KB
/
Item.java
File metadata and controls
58 lines (42 loc) · 1.17 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
package AuctioningSystem;
/*
Code: auction client auctionClient.java
Date: 10th October 2000
Class that creates an item object which holds item information like the description, starting price and reserve price and seller information.
*/
import java.io.Serializable;
public class Item implements Serializable {
private String description;
private Float startingPrice;
private Float reservePrice;
private Float highestBid;
private User seller;
public Item(User user, Float sPrice, Float rPrice, String desc){
seller = user;
description = desc;
startingPrice = sPrice;
reservePrice = rPrice;
}
public String getSellerName(){
String name = seller.getName();
return name;
}
public User getSeller(){
return seller;
}
public String getDescription(){
return description;
}
public Float getStartingPrice(){
return startingPrice;
}
public Float getReservePrice(){
return reservePrice;
}
public Float getHighestBid(){
return highestBid;
}
public void setHighestBid(Float bid){
highestBid = bid;
}
}