Class ExpenseViewCLI

java.lang.Object
com.truebubo.maniflow.expense.ExpenseViewCLI

public class ExpenseViewCLI extends Object
CLI Frontend for expense portion of the application
  • Constructor Details

    • ExpenseViewCLI

      public ExpenseViewCLI(@NonNull ExpenseService expenseService)
      CLI front-end for expenses
      Parameters:
      expenseService - service for accessing expense back-end
  • Method Details

    • showExpenses

      public void showExpenses()
      Displays the list of all the expenses for the user
    • addExpense

      public void addExpense(@NonNull Expense expense)
      Saves the expense
      Parameters:
      expense - Information about the expense to be added
    • changeExpense

      public void changeExpense(int id, @NonNull BigDecimal newAmount)
      Change the value on the expense with given id
      Parameters:
      id - ID identifying the expense. It is the left value displayed when calling showExpenses
      newAmount - Will update the value to this value. If set to zero. The value will be removed