Class BudgetingCell

java.lang.Object
no.ntnu.idatt1002.spendwise.budgeting.BudgetingCell

public class BudgetingCell extends Object
Class that defines the cells in the budgeting table.
  • Constructor Details

    • BudgetingCell

      public BudgetingCell(double expected, double actual, Category category)
      Constructor for the BudgetingCell class.
      Parameters:
      expected - Expected amount of money to spend.
      actual - Actual amount of money spent.
      category - Category of the cell.
    • BudgetingCell

      public BudgetingCell(double actual, Category category)
      Constructor for the BudgetingCell class.
      Parameters:
      actual - Actual amount of money spent.
      category - Category of the cell.
  • Method Details

    • getExpected

      public double getExpected()
      Returns the expected amount of money to spend.
      Returns:
      Expected amount of money to spend as a double.
    • setExpected

      public void setExpected(double newExpected)
      Sets the expected amount of money to spend.
      Parameters:
      newExpected - Expected amount of money to spend as a double.
    • getActual

      public double getActual()
      Returns the actual amount of money spent.
      Returns:
      Actual amount of money spent as a double.
    • setActual

      public void setActual(double newActual)
      Sets the actual amount of money spent.
      Parameters:
      newActual - Actual amount of money spent as a double.
    • getCategoryName

      public String getCategoryName()
      Returns the category of the cell.
      Returns:
      Category of the cell as a string.
    • getDifference

      public double getDifference()
      Returns the difference between the expected and actual amount of money spent.
      Returns:
      Difference between the expected and actual amount of money spent as a double.