/Users/johnr/Desktop/IA_14_-_Stage_P_Upload_all_2021-04-08/GUI - Alan/src/main/java/Expense.java |
1
2
3
4
5
6
7
8
9 @author
10
11 public class Expense extends Trip{
12
13 private String tripName = "not set yet";
14 private String nameOfExpense = "not set yet";
15 private String typeOfExpense = "not set yet";
16 private double costOfExpense = -999.99;
17
18 public Expense() { }
19
20 public Expense(String tripName, String nameOfExpense, String typeOfExpense, double costOfExpense) {
21
22
23 this.tripName = tripName;
24 this.nameOfExpense = nameOfExpense;
25 this.typeOfExpense = typeOfExpense;
26 this.costOfExpense = costOfExpense;
27
28 }
29
30
31 public void setTripName(String newTripName) {
32 tripName = newTripName;
33 }
34
35 public void setNameOfExpense(String newNameOfExpense) {
36 nameOfExpense = newNameOfExpense;
37 }
38
39 public void setTypeOfExpense(String newTypeOfExpense) {
40 typeOfExpense = newTypeOfExpense;
41 }
42
43 public void setCostOfExpense(double newCostOfExpense) {
44 costOfExpense = newCostOfExpense;
45 }
46
47
48 public String getTripName() { return tripName; }
49 public String getNameOfExpense() { return nameOfExpense; }
50 public String getTypeOfExpense() { return typeOfExpense; }
51 public double getCostOfExpense() { return costOfExpense; }
52
53
54 }
55