Skip to content

Commit

Permalink
Merge branch 'master' into junRong-DG-Update
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmejr257 committed Apr 10, 2024
2 parents a6a9887 + 055bc47 commit 7c06ef8
Show file tree
Hide file tree
Showing 52 changed files with 909 additions and 444 deletions.
1 change: 1 addition & 0 deletions data/DefaultCurrency.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Default Currency: SGD
2 changes: 2 additions & 0 deletions data/ExpenseFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2024-04-07 | Transport | 100.00 | bus
2024-04-07 | Transport | 60.00 | train
17 changes: 14 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ following format: `set budget c/<Category> b/<Amount>`

##### Printing Budgets
The following UML Sequence diagram shows how `ListBudgetCommand` works when a user checks the budget status with the
command: `budget print`
command: `print budget`

<img alt="ListBSD2.png" height="400" src="ListBSD2.png" width="700"/>

Expand All @@ -79,7 +79,7 @@ The activity diagram provides an overview of the Budget Management feature's wor

1. The user types `set budget c/food b/500` to set a budget of $500 for the food category. The Parser class creates a
`SetBudgetCommand` object which calls `setBudget()` on the `ExpenseList` object.
2. To view budgets, the user enters `budget print`. The Parser class creates a `ListBudgetCommand` object. This command
2. To view budgets, the user enters `print budget`. The Parser class creates a `ListBudgetCommand` object. This command
retrieves the budgets using `getBudgets()` and displays them, also indicating any categories that are over budget.

## 1. Introduction
Expand Down Expand Up @@ -300,6 +300,17 @@ ExpenseList.


##### 3.6.8 DefaultCurrency
The `DefaultCurrency` class manages the application's default currency setting. It contains a static variable:

- `Currency defaultCurrency`: Holds the current default currency setting, initialized to the Singapore Dollar (SGD) using the `Currency.getInstance("SGD")` method.

The class provides two static methods:

- `getDefaultCurrency()`: Returns the `defaultCurrency` currently set for the application. This allows different parts of the application to retrieve the default currency consistently.

- `setDefaultCurrency(Currency currency)`: Assigns a new `Currency` object to `defaultCurrency`. This method enables the application to update the default currency based on user actions or preferences.

This class ensures a consistent default currency is used throughout the application, essential for functions like displaying amounts and performing currency conversions.

##### 3.6.9 CurrencyConverter
The `CurrencyConverter` class provides functionality for converting amounts between different currencies. It includes two class-level variables:
Expand Down Expand Up @@ -411,7 +422,7 @@ The Listing Savings feature follows these steps when a user inputs a command to
The UML Sequence diagram for the Listing Savings feature would illustrate the interactions between the `User`, `BudgetBuddy`, `Parser`, `ListSavingsCommand`, and `SavingList` classes, showing the method calls and returns between these objects to complete the operation.
![Sequence diagram for List Expense Feature](diagrams/SavingList_SequenceDiagram.png)

### Listing feature (List Expenses)
### Listing Feature (List Expenses)
The Listing Expenses Feature provides users with the ability to view their expenses, which can be filtered by category. The `ListExpenseCommand` class, generated by the `ListCommandCreator`, is responsible for this feature. The class utilizes the `ExpenseList` object to access and manipulate expense records, optionally applying a filter based on the category. The significance of the `ListExpenseCommand` class's attributes is outlined below:

| Class Attribute | Variable Type | Relevance |
Expand Down
117 changes: 90 additions & 27 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ to deal with finances on a singular platform with ease as long as you can type f

## Quick Start
1. Ensure that you have Java 11 installed.
2. Down the latest version of `BudgetBuddy` from [here](https://github.com/AY2324S2-CS2113-T12-3/tp/releases/tag/v2.0).
2. Download the latest version of `BudgetBuddy` from [here](https://github.com/AY2324S2-CS2113-T12-3/tp/releases/tag/v2.0).
3. Copy the file to the folder you want to use as the home folder.
4. Open command terminal, ``cd`` into the folder you put your jar file in, and use the `java -jar BudgetBuddy.jar` command to run the application.
4. Open command terminal, ``cd`` into the folder you put your jar file in, and use the `java -jar BudgetBuddy.jar`
command to run the application.


## Features
Expand All @@ -27,26 +28,27 @@ to deal with finances on a singular platform with ease as long as you can type f
11. Check Splitted Expenses
12. Settle Splitted Expenses
13. Find Expense
14. Add Recurring Bill
15. List Recurring Bills
16. Remove Recurring Bill
17. Add Expense to a Recurring Bill
18. View Expenses in a Recurring Bill
19. Add Expenses in a Recurring Bill to Overall Expenses
20. Change Currency
21. Set Budget
22. Get Budget
23. Print Budget
24. Get Graphical Insights for expenses
25. Get Graphical Insights for savings
14. Recurring Bill Description
15. Add Recurring Bill
16. List Recurring Bills
17. Remove Recurring Bill
18. Add Expense to a Recurring Bill
19. View Expenses in a Recurring Bill
20. Add Expenses in a Recurring Bill to Overall Expenses
21. Change Currency
22. Set Budget
23. Get Budget
24. Print Budget
25. Get Graphical Insights for expenses
26. Get Graphical Insights for savings

### Display Commands : `menu`
Displays the corresponding features of BudgetBuddy

Format: `menu [INDEX]`

* The `INDEX` refers to the number associated with each menu option. If `INDEX` is not provided, the overall
menu list will be displayed
* The `INDEX` refers to the number associated with each menu option. If `INDEX` is not provided **OR**
is of value `0`, the overall menu list will be displayed
* `INDEX` must be either be empty OR a positive integer and a valid index in the menu list

Example of usage:
Expand Down Expand Up @@ -108,7 +110,11 @@ Format: `edit savings c/CATEGORY i/INDEX a/AMOUNT`

Example of usage:

`edit savings c/Entertainment i/3 a/300`
`edit savings c/Salary i/2 a/180 d/Monthly Salary`

Expected Output:

`Saving edited successfully.`

### Edit Expenses: `edit expense`
Edit expenses that have been added previously.
Expand All @@ -123,7 +129,11 @@ Format: `edit expense c/CATEGORY i/INDEX a/AMOUNT d/DESCRIPTION`

Example of usage:

`edit expense c/Utility i/2 a/180 d/Household Electricity`
`edit expense c/Entertainment i/3 a/30 d/movie`

Expected Output:

`Expense edited successfully.`

### Reduce Savings: `reduce savings`

Expand Down Expand Up @@ -167,35 +177,65 @@ Format: `list savings CATEGORY`
* The `CATEGORY` must be a pre-existing category if inputted.
* Similar to listing expenses, users can view their savings with optional category filtering.
* Savings are listed along with their respective categories and amounts.
* Filtered Categories will only display savings with that Category.
* **DOES NOT** affect total savings.
* If there are no listings with the filtered category, nothing will be shown.
* Total savings are displayed at the end of the list, after deducting relevant expenditures.
* **NOT** affected by filtered categories. (i.e will ignore filter category when calculating overall remaining amount)
* Currency of listed savings is stated at the top.

Example Usage:

`list savings`
`list savings Salary`
`list savings Investment`

Expected Output (Empty Saving List) :
![ListSavings_EmptySaving.PNG](userguideimages/ListSavings_EmptySaving.PNG)

Expected Output (Empty Expense List) :
![ListSavings_EmptyExpense.PNG](userguideimages/ListSavings_EmptyExpense.PNG)

### Listing Expenses: `list expense`
Expected Output (Expense Recorded) :
![ListSavings_ExpenseRecorded.PNG](userguideimages/ListSavings_ExpenseRecorded.PNG)

Expected Output (Filtered Category) :
![ListSavings_FilterCategory.PNG](userguideimages/ListSavings_FilterCategory.PNG)


### Listing Expenses: `list expenses`

Lists expenses

Format: `list expense CATEGORY`
Format: `list expenses CATEGORY`

* The `CATEGORY` is optional and can be left blank.
* The `CATEGORY` must be a pre-existing category if inputted.
* When listing expenses, users have the option to filter expenses based on categories.
* Users can specify a category to view expenses related to that category only.
* If no category is specified, the system will list all expenses.
* Index is **NOT** affected so as to facilitate easier identification for deletion.
* If no category is specified, the system will list all expenses.
* If there are no listings with the filtered category, nothing will be shown.
* The listed expenses include details such as the date of the expense, category, amount, and description.
* Total expenses are displayed at the end of the list.
* **NOT** affected by filtered categories. (i.e Filtered Category still displays overall total expenses.)
* Currency of listed expenses is stated at the top.

Example Usage:

`list expenses`
`list expenses Transport`
`list expenses Housing`

Expected Output (Empty Expense List) :
![ListSavings_EmptyExpense.PNG](userguideimages/ListSavings_EmptyExpense.PNG)

Expected Output (Expense Recorded):
![ListExpenses_ExpenseRecorded.PNG](userguideimages/ListExpenses_ExpenseRecorded.PNG)

Expected Output (Filtered Category) :
![ListExpenses_FilteredCategory.PNG](userguideimages/ListExpenses_FilteredCategory.PNG)

### Check splitted expenses `check splitted expenses`

Check expenses
Expand Down Expand Up @@ -233,6 +273,17 @@ Examples of usage :
`find expenses d/coffee morethan/200 lessthan/ ` : Finds all expenses with the word "coffee" and amount higher than $200
`find expenses d/coffee morethan/200 lessthan/400 ` : Finds all expenses with the word "coffee" and amount higher than $200, but lesser than $400

### Recurring Bill Description
The next few features in the user guide would be related to the Recurring Bill Feature. The commands associated to
this overall feature would start with the `rec` command, followed by the relevant `commandType` and parameters. This
feature allows user to create and manage multiple lists of expenses **separate** from the user's overall expenses
, which can be added to the users overall expenses.

The term **recurring** here is to indicate that a user is able to **add** a set of pre-defined expenses to their
overall expenses at any given point in time. Hence, this could range from subscription payments, a future grocery list,
etc.


### Add Recurring Bill : `rec newlist`

Adds a new recurring Bill.
Expand All @@ -256,6 +307,7 @@ Format : `rec viewlists`

* This command is **space sensitive**, in particular, the space between `rec` and `viewlists` must be
**exactly** one space apart for the command to be recognised
* **Note** Anything typed after `rec viewlists` will be ignored.

Examples of Output :

Expand All @@ -274,7 +326,7 @@ Removes a recurring bill
Format : `rec removelist LISTNUMBER`

* `LISTNUMBER` refers to the associated list number of recurring bill when doing a `rec viewlists`
* `LISTNUMBER` must be a **valid** integer, and should be a **valid** list number
* `LISTNUMBER` must be a **valid** integer > 0, and should be a **valid** list number

Examples of usage :

Expand All @@ -291,7 +343,10 @@ Format : `rec newexpense to/LISTNUMBER c/CATEGORY a/AMOUNT d/DESCRIPTION`
* `AMOUNT` refers to the amount value of the expense you wish to add
* `DESCRIPTION` refers to the description of the expense you wish to add
* `LISTNUMBER` must be a **valid** integer, and should be a **valid** list number
* `CATEGORY`, `AMOUNT` and `DESCRIPTION` follows the same constraints as if you were to add a normal expense
* `CATEGORY`, `AMOUNT` and `DESCRIPTION` follows the same constraints as if you were to add a normal expense.
* `to/, c/, a/, d/` must be placed in the **right order**
* **Note** Although the user is able to combine the prefixes without any spaces, etc.
`rec newexpense to/1c/Entertainmenta/200d/movies`, it is strongly recommended to ensure spaces for clarity.

Examples of usage :
`rec newexpense to/1 c/Entertainment a/200 d/movies` : Adds a new expense to the 1st recurring bill
Expand Down Expand Up @@ -338,11 +393,19 @@ Format : `change currency [CURRENCY_CODE]`
* `CURRENCY_CODE` cannot be null.
* Conversion of Currency is interchangeable (e.g. SGD -> USD -> JPY).
* Future additions to Expenses/Savings will be using the current currency displayed.
* (i.e. **ALL** Expenses/Savings will be converted to the new currency.)
* Currency Icon will standardise to use universal `$`.

Examples of usage:

`change currency USD` : Converts current currency into USD

Expected Output (SGD -> USD) :
![CurrencyConverter_ChangeUSD.PNG](userguideimages%2FCurrencyConverter_ChangeUSD.PNG)

Expected Output (USD -> USD) :
![CurrencyConverter_SameCurrency.PNG](userguideimages%2FCurrencyConverter_SameCurrency.PNG)

### Setting Budgets:

Sets budget for specified category
Expand Down Expand Up @@ -375,7 +438,7 @@ in transport category in ascending order, and shows % of budget taken up by each
* If any of the budgets have been exceeded, will be displayed in another table (Table 2)
* Table 2 contains categories that exceeded budget and amount exceeded.

Format: `budget print`
Format: `print budget`


### Get Graphical Insights for expenses: `get expenses insights`
Expand Down Expand Up @@ -422,13 +485,13 @@ Advanced users are welcome to update the data directly by editing this file. How
* Add Expense: `add expense c/CATEGORY a/AMOUNT d/DESCRIPTION`
* Edit Expenses `edit expense c/CATEGORY i/INDEX a/AMOUNT d/DESCRIPTION`
* Edit Savings `edit savings c/CATEGORY i/INDEX a/AMOUNT`
* List Expenses: `list expenses CATEGORY`
* List Savings: `list savings CATEGORY`
* List Expenses: `list expenses [CATEGORY]`
* List Savings: `list savings [CATEGORY]`
* Find Expenses `find expenses [d/DESCRIPTION] [morethan/MINAMOUNT] [lessthan/MAXAMOUNT]`
* Change Currency `change currency [CURRENCY_CODE]`
* Set Budget `set budget c/CATEGORY b/BUDGET`
* Get Budget `get budget c/CATEGORY`
* Print Budgets `budget print`
* Print Budgets `print budget`
* Get Graphical Insights for expenses `get expenses insights`
* Get Graphical Insights for savings `get savings insights`

Binary file modified docs/diagrams/CurrencyConverter_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/diagrams/ExpenseList_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/diagrams/SavingList_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 0 additions & 34 deletions docs/team/EditExpenseSequence.puml

This file was deleted.

Loading

0 comments on commit 7c06ef8

Please sign in to comment.