forked from cybernobie/Cognizant_Early_Engagement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transaction.java
57 lines (52 loc) · 1.36 KB
/
Transaction.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
package library;
import java.util.Date;
public class Transaction {
private final Member member;
private final Book book;
private final int transactionId;
private final String transactionType;
private static final int NO_OF_BOOKS = 0;
private final Date transactionDate;
private final Date bookTobeReturnDate;
private final Date bookReturnDate;
private final double penalty;
public Transaction(Member member, Book book, int transactionId, String transactionType, Date transactionDate,
Date bookTobeReturnDate, Date bookReturnDate, double penalty) {
super();
this.member = member;
this.book = book;
this.transactionId = transactionId;
this.transactionType = transactionType;
this.transactionDate = transactionDate;
this.bookTobeReturnDate = bookTobeReturnDate;
this.bookReturnDate = bookReturnDate;
this.penalty = penalty;
}
public Member getMember() {
return member;
}
public Book getBook() {
return book;
}
public int getTransactionId() {
return transactionId;
}
public String getTransactionType() {
return transactionType;
}
public static int getNoOfBooks() {
return NO_OF_BOOKS;
}
public Date getTransactionDate() {
return transactionDate;
}
public Date getBookTobeReturnDate() {
return bookTobeReturnDate;
}
public Date getBookReturnDate() {
return bookReturnDate;
}
public double getPenalty() {
return penalty;
}
}