diff --git a/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java b/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java index 905669955c..82eade99d0 100644 --- a/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java +++ b/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java @@ -39,12 +39,12 @@ public ChangeCurrencyCommandCreator(String input, SavingList savings, ExpenseLis * Parses the user input to create a ChangeCurrencyCommand for changing the default currency. * If the input is valid, a ChangeCurrencyCommand is returned with the specified new currency. * + * @author sweijie24 * @param input The user input to be parsed. * @param savingList The SavingList containing savings data. * @param expenseList The ExpenseList containing expenses data. * @param currencyConverter The CurrencyConverter object for currency conversion. * @return A ChangeCurrencyCommand if the input is valid; otherwise, null. - * @author sweijie24 */ public Command handleChangeCurrencyCommand(String input, SavingList savingList, ExpenseList expenseList, SplitExpenseList splitExpenses, diff --git a/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java b/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java index 6c2f816333..1fb8f3935e 100644 --- a/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java +++ b/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java @@ -75,11 +75,11 @@ private boolean isValidSavingsCategory(String category) { * Parses the user input to create a ListCommand for listing expenses or savings. * If the input is valid, a ListCommand is returned with the specified list type and optional filter category. * + * @author sweijie24 * @param input The user input to be parsed. * @param expenseList The ExpenseList containing expenses data. * @param savingList The SavingList containing savings data. * @return A ListCommand if the input is valid; otherwise, null. - * @author sweijie24 */ public Command handleListCommand(String input, ExpenseList expenseList, SavingList savingList) { assert input != null : "Input should not be null"; diff --git a/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java b/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java index 05130792a7..f7b4fd999e 100644 --- a/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java +++ b/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java @@ -31,13 +31,13 @@ public CurrencyConverter() { /** * Converts an amount from one currency to another using exchange rates. * + * @author sweijie24 * @param amount The amount to be converted. * @param fromCurrency The currency of the original amount. * @param toCurrency The currency to which the amount is to be converted. * @return The converted amount in the target currency. * @throws IllegalArgumentException If exchange rates are not available for one or both currencies, * or if exchange rates are not positive numbers. - * @author sweijie24 */ public double convertAmount(double amount, Currency fromCurrency, Currency toCurrency) { if (!exchangeRates.containsKey(fromCurrency) || !exchangeRates.containsKey(toCurrency)) { @@ -76,10 +76,10 @@ public double convertAmount(double amount, Currency fromCurrency, Currency toCur * Converts the currency of expenses in the given ExpenseList to the specified new currency. * No conversion necessary if trying to convert to the same currency. * + * @author sweijie24 * @param newCurrency The new currency to convert expenses to. * @param expenses The ExpenseList containing the expenses to be converted. * @throws IllegalArgumentException If the ExpenseList is null. - * @author sweijie24 */ public void convertExpenseCurrency(Currency newCurrency, ExpenseList expenses) { if (expenses == null) { @@ -146,10 +146,10 @@ public void convertSplitExpenseCurrency(Currency newCurrency, SplitExpenseList s * Converts the currency of savings in the given SavingList to the specified new currency. * No conversion necessary if trying to convert to the same currency. * + * @author sweijie24 * @param newCurrency The new currency to convert savings to. * @param savings The SavingList containing the savings to be converted. * @throws IllegalArgumentException If the SavingList is null. - * @author sweijie24 */ public void convertSavingCurrency(Currency newCurrency, SavingList savings) { if (savings == null) { diff --git a/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java b/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java index c620e540f6..b4d0323330 100644 --- a/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java +++ b/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java @@ -89,8 +89,8 @@ public ArrayList filterExpenses(String description, Double minAmount, D * Lists expenses based on the provided filter category. * If no filter category is specified, all expenses are listed. * - * @param filterCategory the category by which to filter the expenses (optional) * @author sweijie24 + * @param filterCategory the category by which to filter the expenses (optional) */ public void listExpenses(String filterCategory) { LOGGER.info("Listing expenses..."); @@ -131,9 +131,9 @@ public void listExpenses(String filterCategory) { * Calculates the total expenses from the list of expenses. * Negative expense amounts are considered invalid. * + * @author sweijie24 * @return The total expenses. * @throws IllegalArgumentException If any expense amount is negative. - * @author sweijie24 */ public double calculateTotalExpenses() { double totalExpenses = 0; diff --git a/src/main/java/seedu/budgetbuddy/commons/SavingList.java b/src/main/java/seedu/budgetbuddy/commons/SavingList.java index 15747c4162..84ab1586c4 100644 --- a/src/main/java/seedu/budgetbuddy/commons/SavingList.java +++ b/src/main/java/seedu/budgetbuddy/commons/SavingList.java @@ -66,9 +66,9 @@ public void findTotalSavings() { * and calculates the remaining savings after deducting expenses. * Prints the initial savings amount, expenses deducted, and the remaining amount. * + * @author sweijie24 * @param filterCategory The category to filter savings by (optional). If null, all savings are listed. * @param expenseList The ExpenseList object containing the expenses to deduct from savings. - * @author sweijie24 */ public void listSavings(String filterCategory, ExpenseList expenseList) { LOGGER.info("Listing savings..."); @@ -114,10 +114,10 @@ public void listSavings(String filterCategory, ExpenseList expenseList) { /** * Calculates the remaining savings amount after deducting total expenses from the initial amount. * + * @author sweijie24 * @param initialAmount The initial amount of savings. * @param totalExpenses The total amount of expenses to be deducted. * @return The remaining savings amount after deducting total expenses. - * @author sweijie24 */ public double calculateRemainingSavings(double initialAmount, double totalExpenses) { try {