Package no.ntnu.idatt1002.spendwise.data
Class RecurringIncome
java.lang.Object
no.ntnu.idatt1002.spendwise.data.Transaction
no.ntnu.idatt1002.spendwise.data.Income
no.ntnu.idatt1002.spendwise.data.RecurringIncome
Describes a recurring income, inheriting from the Income class.
-
Constructor Summary
ConstructorsConstructorDescriptionRecurringIncome(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.Income
amountToStringMethods inherited from class no.ntnu.idatt1002.spendwise.data.Transaction
getAmount, getAmountString, getCategory, getDate, getName, getNotes, setCategory
-
Constructor Details
-
RecurringIncome
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.
-