diff --git a/src/main/java/seedu/budgetbuddy/command/ChangeCurrencyCommand.java b/src/main/java/seedu/budgetbuddy/command/ChangeCurrencyCommand.java index 3bbc112724..78055e58fa 100644 --- a/src/main/java/seedu/budgetbuddy/command/ChangeCurrencyCommand.java +++ b/src/main/java/seedu/budgetbuddy/command/ChangeCurrencyCommand.java @@ -9,6 +9,9 @@ import java.util.Currency; +/** + * @@author sweijie24 + */ public class ChangeCurrencyCommand extends Command { private Currency newCurrency; diff --git a/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java b/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java index dcae145f94..905669955c 100644 --- a/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java +++ b/src/main/java/seedu/budgetbuddy/commandcreator/ChangeCurrencyCommandCreator.java @@ -44,6 +44,7 @@ public ChangeCurrencyCommandCreator(String input, SavingList savings, ExpenseLis * @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 44b954d87a..6c2f816333 100644 --- a/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java +++ b/src/main/java/seedu/budgetbuddy/commandcreator/ListCommandCreator.java @@ -79,6 +79,7 @@ private boolean isValidSavingsCategory(String category) { * @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 2edcb62bb6..05130792a7 100644 --- a/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java +++ b/src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.logging.Logger; +//@author sweijie24 public class CurrencyConverter { private static final Logger LOGGER = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); @@ -36,6 +37,7 @@ public CurrencyConverter() { * @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)) { @@ -77,6 +79,7 @@ public double convertAmount(double amount, Currency fromCurrency, Currency toCur * @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,6 +149,7 @@ public void convertSplitExpenseCurrency(Currency newCurrency, SplitExpenseList s * @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/DefaultCurrency.java b/src/main/java/seedu/budgetbuddy/commons/DefaultCurrency.java index 24454c82fc..a16d072976 100644 --- a/src/main/java/seedu/budgetbuddy/commons/DefaultCurrency.java +++ b/src/main/java/seedu/budgetbuddy/commons/DefaultCurrency.java @@ -2,6 +2,7 @@ import java.util.Currency; +//@author sweijie24 public class DefaultCurrency { private static Currency defaultCurrency = Currency.getInstance("SGD"); diff --git a/src/main/java/seedu/budgetbuddy/commons/Expense.java b/src/main/java/seedu/budgetbuddy/commons/Expense.java index 1f913f66f4..86a8c39964 100644 --- a/src/main/java/seedu/budgetbuddy/commons/Expense.java +++ b/src/main/java/seedu/budgetbuddy/commons/Expense.java @@ -2,6 +2,7 @@ import java.time.LocalDate; +//@author sweijie24 public class Expense extends Transaction{ protected String description; private LocalDate dateAdded; diff --git a/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java b/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java index a442138813..c620e540f6 100644 --- a/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java +++ b/src/main/java/seedu/budgetbuddy/commons/ExpenseList.java @@ -90,6 +90,7 @@ public ArrayList filterExpenses(String description, Double minAmount, D * If no filter category is specified, all expenses are listed. * * @param filterCategory the category by which to filter the expenses (optional) + * @author sweijie24 */ public void listExpenses(String filterCategory) { LOGGER.info("Listing expenses..."); @@ -132,6 +133,7 @@ public void listExpenses(String filterCategory) { * * @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/Saving.java b/src/main/java/seedu/budgetbuddy/commons/Saving.java index 7ce90bba94..10c95500ec 100644 --- a/src/main/java/seedu/budgetbuddy/commons/Saving.java +++ b/src/main/java/seedu/budgetbuddy/commons/Saving.java @@ -1,4 +1,6 @@ package seedu.budgetbuddy.commons; + +//@author sweijie24 public class Saving extends Transaction{ public Saving(String category, double amount) { diff --git a/src/main/java/seedu/budgetbuddy/commons/SavingList.java b/src/main/java/seedu/budgetbuddy/commons/SavingList.java index eff164cec3..15747c4162 100644 --- a/src/main/java/seedu/budgetbuddy/commons/SavingList.java +++ b/src/main/java/seedu/budgetbuddy/commons/SavingList.java @@ -68,6 +68,7 @@ public void findTotalSavings() { * * @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..."); @@ -116,6 +117,7 @@ public void listSavings(String filterCategory, ExpenseList expenseList) { * @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 { diff --git a/src/test/java/seedu/budgetbuddy/ChangeCurrencyCommandCreatorTest.java b/src/test/java/seedu/budgetbuddy/ChangeCurrencyCommandCreatorTest.java index 02efdbe0c5..dbafe8cbea 100644 --- a/src/test/java/seedu/budgetbuddy/ChangeCurrencyCommandCreatorTest.java +++ b/src/test/java/seedu/budgetbuddy/ChangeCurrencyCommandCreatorTest.java @@ -14,6 +14,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +//@@author sweijie24 public class ChangeCurrencyCommandCreatorTest { diff --git a/src/test/java/seedu/budgetbuddy/CurrencyConverterTest.java b/src/test/java/seedu/budgetbuddy/CurrencyConverterTest.java index 7308774296..d9c9564c24 100644 --- a/src/test/java/seedu/budgetbuddy/CurrencyConverterTest.java +++ b/src/test/java/seedu/budgetbuddy/CurrencyConverterTest.java @@ -11,6 +11,7 @@ import java.util.Currency; import static org.junit.jupiter.api.Assertions.assertEquals; +//@@author sweijie24 public class CurrencyConverterTest { @Test diff --git a/src/test/java/seedu/budgetbuddy/ExpenseListTest.java b/src/test/java/seedu/budgetbuddy/ExpenseListTest.java index 740d9940ef..fac80d4a40 100644 --- a/src/test/java/seedu/budgetbuddy/ExpenseListTest.java +++ b/src/test/java/seedu/budgetbuddy/ExpenseListTest.java @@ -17,6 +17,8 @@ import java.util.ArrayList; + +//@@author sweijie24 public class ExpenseListTest { private static final Logger LOGGER = Logger.getLogger(ExpenseListTest.class.getName()); diff --git a/src/test/java/seedu/budgetbuddy/ListCommandCreatorTest.java b/src/test/java/seedu/budgetbuddy/ListCommandCreatorTest.java index e675b1d4d9..d633c3c9b3 100644 --- a/src/test/java/seedu/budgetbuddy/ListCommandCreatorTest.java +++ b/src/test/java/seedu/budgetbuddy/ListCommandCreatorTest.java @@ -12,6 +12,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +//@@author sweijie24 public class ListCommandCreatorTest { @Test diff --git a/src/test/java/seedu/budgetbuddy/SavingListTest.java b/src/test/java/seedu/budgetbuddy/SavingListTest.java index 80534cc6b5..9332729eca 100644 --- a/src/test/java/seedu/budgetbuddy/SavingListTest.java +++ b/src/test/java/seedu/budgetbuddy/SavingListTest.java @@ -12,6 +12,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; + +//@@author sweijie24 public class SavingListTest { private static final Logger LOGGER = Logger.getLogger(SavingListTest.class.getName());