Package no.ntnu.idatt1002.spendwise.data
Class RecurringExpense
java.lang.Object
no.ntnu.idatt1002.spendwise.data.Transaction
no.ntnu.idatt1002.spendwise.data.Expense
no.ntnu.idatt1002.spendwise.data.RecurringExpense
Describes a recurring expense, inheriting from the Expense class.
-
Constructor Summary
ConstructorsConstructorDescriptionRecurringExpense(String name, String notes, String date, double amount) Constructor for a recurring expense. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisWithinTimeFrame(LocalDate fromDate, LocalDate toDate) Returns whether the expense is within the given time frame.Methods inherited from class no.ntnu.idatt1002.spendwise.data.Expense
amountToStringMethods inherited from class no.ntnu.idatt1002.spendwise.data.Transaction
getAmount, getAmountString, getCategory, getDate, getName, getNotes, setCategory
-
Constructor Details
-
RecurringExpense
Constructor for a recurring expense.- Parameters:
name- Name of the expense.notes- Notes for the expense.date- Date of the expense. (Day of the month)amount- Amount of the expense.
-
-
Method Details
-
isWithinTimeFrame
Returns whether the expense is within the given time frame.- Overrides:
isWithinTimeFramein classTransaction- Parameters:
fromDate- The start date of the time frame.toDate- The end date of the time frame.- Returns:
- True if the expense is within the time frame, false otherwise.
-