Add method which puts all expenses on equal comparison grounds.

This commit is contained in:
Hyperling 2025-02-06 11:50:02 -07:00
parent 78a407d0ec
commit 15fa4aadbd

View File

@ -15,4 +15,8 @@ class Expense {
String toString() {
return "$name, $cost, ${frequency.title}, $description";
}
double calcComparableCost() {
return cost * frequency.timesPerYear;
}
}