-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRent.java
61 lines (52 loc) · 1.26 KB
/
Rent.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
50
51
52
53
54
55
56
57
58
59
60
61
package com.canavci.library.dom;
import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class Rent {
int p;
int b;
java.sql.Date hireDate;
java.sql.Date returnDate;
boolean hasReturned;
public Rent(int p, int b, java.sql.Date returnDate) throws ParseException {
this.p = p;
this.b = b;
this.returnDate = returnDate;
String sdate= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date date = sdf.parse(sdate);
hireDate = new Date(date.getTime());
}
public boolean isHasReturned() {
return hasReturned;
}
public void setHasReturned(boolean hasReturned) {
this.hasReturned = hasReturned;
}
public int getP() {
return p;
}
public void setP(int p) {
this.p = p;
}
public int getB() {
return b;
}
public void setB(int b) {
this.b = b;
}
public java.sql.Date getReturnDate() {
return returnDate;
}
public void setReturnDate(java.sql.Date returnDate) {
this.returnDate = returnDate;
}
public java.sql.Date getHireDate() {
return hireDate;
}
public void setHireDate(java.sql.Date hireDate) {
this.hireDate = hireDate;
}
}