-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccountTransaction.java
More file actions
32 lines (26 loc) · 857 Bytes
/
Copy pathAccountTransaction.java
File metadata and controls
32 lines (26 loc) · 857 Bytes
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
public class AccountTransaction {
private String date;
private String type;
private double amount;
public AccountTransaction() {
date = "";
type = "";
amount = 0;
}
public AccountTransaction(String date, String type, double amount) {
this.date = date;
this.type = type;
this.amount = amount;
}
public String getDate() { return date; }
public String getType() { return type; }
public double getAmount() { return amount; }
public void setDate(String date) { this.date = date; }
public void setType(String type) { this.type = type; }
public void setAmount(double amount) { this.amount = amount; }
public String toString() {
return "\nDate = " + date +
"\nType = " + type +
"\nAmount = " + amount + "\n";
}
}