-
Notifications
You must be signed in to change notification settings - Fork 513
Expand file tree
/
Copy pathExpense.java
More file actions
30 lines (24 loc) · 732 Bytes
/
Copy pathExpense.java
File metadata and controls
30 lines (24 loc) · 732 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
package splitwise.model;
import java.util.List;
public class Expense {
public enum ExpenseType {
EQUAL, EXACT, PERCENT
}
User payer;
double totalExpense;
int size;
ExpenseType type;
List<User> users;
List<Double> expenses;
public Expense(User payer, double totalExpense, ExpenseType type, List<User> users, List<Double> expenses) {
this.payer = payer;
this.totalExpense = totalExpense;
this.type = type;
this.users = users;
this.size = users.size();
this.expenses = expenses;
}
public Expense(User payer, double totalExpense, ExpenseType type, List<User> users) {
this(payer, totalExpense, type, users, null);
}
}