-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpense.java
More file actions
58 lines (46 loc) · 1.08 KB
/
Copy pathExpense.java
File metadata and controls
58 lines (46 loc) · 1.08 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
/**
*
* @author PC
*/
public class Expense {
private int ID;
private String date, content;
private double amount;
public Expense() {
}
public Expense(int ID, String date, double amount, String content) {
this.ID = ID;
this.date = date;
this.amount = amount;
this.content = content;
}
public int getID() {
return ID;
}
public void setID(int ID) {
this.ID = ID;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
@Override
public String toString() {
String out = String.format("%-4d%-15s%-15.2f%-20s", ID, date, amount, content);
return out;
}
}