Skip to content

Commit

Permalink
Update author format
Browse files Browse the repository at this point in the history
  • Loading branch information
sweijie24 committed Apr 13, 2024
1 parent d230222 commit c577e65
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/budgetbuddy/commons/ExpenseList.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public ArrayList<Expense> 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...");
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/budgetbuddy/commons/SavingList.java
Original file line number Diff line number Diff line change
Expand Up @@ -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...");
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c577e65

Please sign in to comment.