-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExpense.java
64 lines (59 loc) · 1.12 KB
/
Expense.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
62
63
64
public class Expense
{
private int month;
private int day;
private String category;
private String payee;
private float amount;
public Expense()
{
month = 0;
day = 0;
category = null;
payee = null;
amount = 0.0f;
}
public Expense(int m, int d, String p, float a, String c)
{
month = m;
day = d;
payee = p;
amount = a;
category = c;
}
public int getMonth(){
return month;
}
public void setMonth(int month){
this.month = month;
}
public int getDay(){
return day;
}
public void setDay(int day){
this.day = day;
}
public String getCategory(){
return category;
}
public void setCategory(String category){
this.category = category;
}
public String getPayee(){
return payee;
}
public void setPayee(String payee){
this.payee = payee;
}
public float getAmount(){
return amount;
}
public void setAmount(float amount){
this.amount = amount;
}
@Override
public String toString()
{
return getMonth() + "/" + getDay() + " " + getPayee() + " " + getAmount() + " " + getCategory();
}
}