-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction
More file actions
66 lines (60 loc) · 1.19 KB
/
Copy pathTransaction
File metadata and controls
66 lines (60 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
package uwstout.cs144.projects.project2.account;
/**
* This class will represent one transaction on an account and when it occurred.
*
* @author FlowersC
* @version 2016-11-19
*/
public class Transaction {
/**
* The id of the transaction.
*/
private int id;
/**
* The date of the transaction.
*/
private String date;
/**
* The amount of the transaction.
*/
private double amount;
/**
* This constructor creates a new transaction.
*
* @param nId
* the id of the transaction
* @param nDate
* the date of the transaction
* @param nAmount
* the amount of the transaction
*/
public Transaction(int nId, String nDate, double nAmount) {
id = nId;
date = nDate;
amount = nAmount;
}
/**
* This getter gets the id of the transaction.
*
* @return the id of the transaction
*/
public int getId() {
return id;
}
/**
* This getter gets the date of the transaction.
*
* @return the date of the transaction
*/
public String getDate() {
return date;
}
/**
* This getter gets the amount of the transaction.
*
* @return the amount of the transaction
*/
public double getAmount() {
return amount;
}
}