-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItem.java
49 lines (41 loc) · 1.05 KB
/
Item.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
49
import java.util.Date;
public class Item {
private final int id;
private final String title;
private final String genre;
private final Date releaseDate;
boolean isAvailable;
static int rentalfee;
public Item(String title,String genre,Date releaseDate,int id , int rentalfee){
this.title=title;
this.genre=genre;
this.releaseDate=releaseDate;
this.isAvailable=true;
Item.rentalfee =rentalfee;
this.id=id;
}
public int getId() {
return id;
}
public String getTitle() {
return title;
}
public String getGenre() {
return genre;
}
public int getRentalfee() {
return rentalfee;
}
public Date getReleaseDate() {
return releaseDate;
}
public boolean isAvailable() {
return isAvailable;
}
public void setAvailable(boolean available) {
isAvailable = available;
}
public String toString() {
return this.getTitle();
}
}