From 03872b1f13b4295aec4701a550834a504ac33ec1 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 04:31:09 +0800 Subject: [PATCH 01/12] Update command summary --- docs/UserGuide.md | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index d898dde525..6333eb0588 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -250,13 +250,37 @@ Existing data will be automatically loaded when the program starts up. {Give a 'cheat sheet' of commands here} -| Action | Format | -|----------------------|---------------------------| -| **Set budget** | `budget set /b BUDGET` | -| **Update budget** | `budget update /b BUDGET` | -| **Reset budget** | `budget reset` | -| **Delete budget** | `budget delete` | -| **View budget** | `budget view` | -| **Display Overview** | `overview` | -| **View balance** | `balance` | -| **Exit program** | `exit` | +| Action | Format | +|----------------------------------|------------------------------------------------------------| +| **Add income** | `add income /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | +| **Add expense** | `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | +| **Delete cashflow** | `delete INDEX [/r]` | +| **Delete income** | `delete income INDEX [/r]` | +| **Delete expense** | `delete expense INDEX [/r]` | +| **Delete recurrence** | `delete recurrence INDEX [/r]` | +| **list all cashflows** | `list` | +| **list all incomes** | `list income` | +| **list all expenses** | `list expense` | +| **list all recurring cashflows** | `list recurrence* | +| **Set budget** | `budget set /b BUDGET` | +| **Update budget** | `budget update /b BUDGET` | +| **Reset budget** | `budget reset` | +| **Delete budget** | `budget delete` | +| **View budget** | `budget view` | +| **Display Overview** | `overview` | +| **View balance** | `balance` | +| **Exit program** | `exit` | + +- Note: Cashflow is referring to an income or expense + +**Income and Expense types** + +| Income | Expense | +|---------------|-----------------| +| `salary` | `dining` | +| `investments` | `entertainment` | +| `allowance` | `shopping` | +| `others` | `travel` | +| | `insurance` | +| | `necessities` | +| | `others` | From 81de164062fdd1652f5568b0695cfb48bf4b9f0b Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 04:35:17 +0800 Subject: [PATCH 02/12] Add addIncome and addExpense to features --- docs/UserGuide.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 6333eb0588..fe63be49b7 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -34,11 +34,72 @@ you a one-stop interface to access a plethora of features to manage your finance {Give steps to get started quickly} 1. Ensure that you have Java 11 or above installed. -1. Down the latest version of `Duke` from [here](http://link.to/duke). +1. Down the latest version of `Financial Planner` from [here](http://link.to/duke). +1. Copy the file to the folder you want to use as the *home folder* for Neo Chatbot. +1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar ip.jar` command to run the application. +1. Refer to the **Features** section below for details of each command. ## Features {Give detailed description of each feature} +### Notes about the command format +- Words in `UPPER_CASE` are parameters to be supplied by the user. + + e.g. in `add income /a AMOUNT`, `AMOUNT` is a parameter which can be used as `add income /a 100`. +- Items in square brackets are optional. + + e.g. `[/r DAYS]` can be used as `/r 30` or left empty. + +### Add income: `add income` +Adds an income source to the Financial Planner. + +Format: `add income /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` + +- `/r` is used to denote a recurring income, with the period to the next addition is specified by `DAYS`. +- `/d` is used to give a description to the income. +- `/t` is used to specify the income type, where the list of acceptable types is given below + +| Income Types | +|---------------| +| `salary` | +| `investments` | +| `allowance` | +| `others` | + +Example of usage: `add income /a 5000 /t salary /r 30 /d work` + +Example output: + +``` + +``` + +### Add expense +Adds an expense to the Financial Planner + +Format: `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` + +- `/r` is used to denote a recurring expense, with the period to the next addition is specified by `DAYS`. +- `/d` is used to give a description to the expense. +- `/t` is used to specify the expense type, where the list of acceptable types is given below + +| Expense | +|-----------------| +| `dining` | +| `entertainment` | +| `shopping` | +| `travel` | +| `insurance` | +| `necessities` | +| `others` | + +Example of usage: `add income /a 5000 /t salary /r 30 /d work` + +Example output: +``` + +``` + ### Budget From 1a0b086dc05b8f2bb4806de28f5553f05701f2ec Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 04:48:14 +0800 Subject: [PATCH 03/12] Add delete features to UG --- docs/UserGuide.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index fe63be49b7..6acc95e6bd 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -100,7 +100,86 @@ Example output: ``` +### Delete cashflow +Deletes an income/expense from the Financial Planner. +Format: `delete INDEX [/r]` + +- `INDEX` refers to the index number shown in the displayed list when `list` command is used. +- `/r` is used to delete all **future** incomes/expenses **only**. + +Example of usage: `delete 2 /r` + +Example output: +``` + +``` +Example of usage: `delete 2` + +Example output: +``` + +``` +### Delete income +Deletes an income from the Financial Planner. + +Format: `delete income INDEX [/r]` + +- `INDEX` refers to the index number shown in the displayed list when `list income` command is used. +- `/r` is used to delete all **future** incomes **only**. + +Example of usage: `delete income 2 /r` + +Example output: +``` + +``` +Example of usage: `delete income 2` + +Example output: +``` + +``` +### Delete expense +Deletes an expense from the Financial Planner. + +Format: `delete expense INDEX [/r]` + +- `INDEX` refers to the index number shown in the displayed list when `list expense` command is used. +- `/r` is used to delete all **future** expenses **only**. + +Example of usage: `delete expense 2 /r` + +Example output: +``` + +``` +Example of usage: `delete expense 2` + +Example output: +``` + +``` +### Delete recurring +Deletes a recurring income/expense from the Financial Planner. + +Format: `delete recurring INDEX [/r]` + +- `INDEX` refers to the index number shown in the displayed list when `list recurring` command is used. +- `/r` is used to delete all **future** recurring incomes/expenses **only**. + +Example of usage: `delete recurring 2` + +Example output: +``` + +``` +Example of usage: `delete recurring 2 /r` + +Example output: +``` + +``` ### Budget #### Setting a budget: `budget set` From 2b335de9713a9223d9ce798ccfaaaa79ea1e63f0 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 04:57:20 +0800 Subject: [PATCH 04/12] Add list functions to UG --- docs/UserGuide.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 6acc95e6bd..82d83ea1f9 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -101,11 +101,11 @@ Example output: ``` ### Delete cashflow -Deletes an income/expense from the Financial Planner. +Deletes a cashflow from the Financial Planner. Format: `delete INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when `list` command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list`](#list-all) command is used. - `/r` is used to delete all **future** incomes/expenses **only**. Example of usage: `delete 2 /r` @@ -125,7 +125,7 @@ Deletes an income from the Financial Planner. Format: `delete income INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when `list income` command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list income`](#list-income) command is used. - `/r` is used to delete all **future** incomes **only**. Example of usage: `delete income 2 /r` @@ -145,7 +145,7 @@ Deletes an expense from the Financial Planner. Format: `delete expense INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when `list expense` command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list expense`](#list-expense) command is used. - `/r` is used to delete all **future** expenses **only**. Example of usage: `delete expense 2 /r` @@ -161,11 +161,11 @@ Example output: ``` ### Delete recurring -Deletes a recurring income/expense from the Financial Planner. +Deletes a recurring cashflow from the Financial Planner. Format: `delete recurring INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when `list recurring` command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list recurring`](#list-recurring) command is used. - `/r` is used to delete all **future** recurring incomes/expenses **only**. Example of usage: `delete recurring 2` @@ -180,6 +180,26 @@ Example output: ``` ``` +### List all + +### List income + +### List expense + +### List recurring +Lists all recurring cashflows. + +Format: `list recurring` + +- This list will not include any cashflow that has already recurred. + +Example of usage: `list recurring` + +Example output: +``` + +``` + ### Budget #### Setting a budget: `budget set` From 49403686bde95794a2b0630a8cdd3d1ba9941806 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 05:19:49 +0800 Subject: [PATCH 05/12] Add example outputs --- docs/UserGuide.md | 187 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 160 insertions(+), 27 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 82d83ea1f9..eb28544379 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -71,10 +71,16 @@ Example of usage: `add income /a 5000 /t salary /r 30 /d work` Example output: ``` - -``` - -### Add expense +You have added an Income + Type: Salary + Amount: 5000.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: work +to the Financial Planner. +Balance: 5000.00 +``` +- Note: Balance displayed above is just an example. Your actual balance may differ. +### Add expense: `add expense` Adds an expense to the Financial Planner Format: `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` @@ -93,34 +99,52 @@ Format: `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | `necessities` | | `others` | -Example of usage: `add income /a 5000 /t salary /r 30 /d work` +Example of usage: `add expense /a 300 /t necessities /r 30 /d groceries` Example output: ``` - +You have added an Expense + Type: Necessities + Amount: 300.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: groceries +to the Financial Planner. +Balance: 4700.00 ``` - -### Delete cashflow +- Note: Balance displayed above is just an example. Your actual balance may differ. +### Delete cashflow: `delete` Deletes a cashflow from the Financial Planner. Format: `delete INDEX [/r]` - `INDEX` refers to the index number shown in the displayed list when [`list`](#list-all) command is used. -- `/r` is used to delete all **future** incomes/expenses **only**. +- `/r` is used to delete all **future** cashflows **only**. -Example of usage: `delete 2 /r` +Example of usage: `delete 1 /r` Example output: ``` - +You have removed future recurrences of this cashflow. +Updated cashflow: +Income + Type: Salary + Amount: 5000.00 + Description: work ``` -Example of usage: `delete 2` +Example of usage: `delete 1` Example output: ``` - +You have removed an Income + Type: Salary + Amount: 5000.00 + Description: work +from the Financial Planner. +Balance: -1130.00 ``` -### Delete income +- Note: Balance displayed above is just an example. Your actual balance may differ. + +### Delete income: `delete income` Deletes an income from the Financial Planner. Format: `delete income INDEX [/r]` @@ -132,15 +156,27 @@ Example of usage: `delete income 2 /r` Example output: ``` - +You have removed future recurrences of this cashflow. +Updated cashflow: +Income + Type: Allowance + Amount: 500.00 + Description: parents ``` Example of usage: `delete income 2` Example output: ``` - +You have removed an Income + Type: Allowance + Amount: 500.00 + Description: parents +from the Financial Planner. +Balance: 5170.00 ``` -### Delete expense +- Note: Balance displayed above is just an example. Your actual balance may differ. + +### Delete expense: `delete expense` Deletes an expense from the Financial Planner. Format: `delete expense INDEX [/r]` @@ -152,41 +188,128 @@ Example of usage: `delete expense 2 /r` Example output: ``` - +You have removed future recurrences of this cashflow. +Updated cashflow: +Expense + Type: Insurance + Amount: 800.00 + Description: ntuc income ``` Example of usage: `delete expense 2` Example output: ``` - +You have removed an Expense + Type: Insurance + Amount: 800.00 + Description: ntuc income +from the Financial Planner. +Balance: -330.00 ``` -### Delete recurring +- Note: Balance displayed above is just an example. Your actual balance may differ. + +### Delete recurring: `delete recurring` Deletes a recurring cashflow from the Financial Planner. Format: `delete recurring INDEX [/r]` - `INDEX` refers to the index number shown in the displayed list when [`list recurring`](#list-recurring) command is used. -- `/r` is used to delete all **future** recurring incomes/expenses **only**. +- `/r` is used to delete all **future** recurring cashflows **only**. -Example of usage: `delete recurring 2` +Example of usage: `delete recurring 2 /r` Example output: ``` - +You have removed future recurrences of this cashflow. +Updated cashflow: +Expense + Type: Insurance + Amount: 800.00 + Description: ntuc income ``` -Example of usage: `delete recurring 2 /r` +Example of usage: `delete recurring 1` Example output: ``` +You have removed an Expense + Type: Necessities + Amount: 300.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: groceries +from the Financial Planner. +Balance: -830.00 +- Note: Balance displayed above is just an example. Your actual balance may differ. ``` -### List all +### List all +// TODO +Example output: + +``` +You have 4 matching cashflows: +1: Income + Type: Salary + Amount: 5000.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: work +2: Expense + Type: Dining + Amount: 30.00 + Description: Genki Sushi +3: Expense + Type: Insurance + Amount: 800.00 + Recurring every: 365 days, starting from: Oct 30 2023 + Description: ntuc income +4: Expense + Type: Necessities + Amount: 300.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: groceries +``` ### List income +//TODO +Example output: +``` +You have 3 matching cashflows: +1: Income + Type: Salary + Amount: 5000.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: work +2: Income + Type: Allowance + Amount: 500.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: parents +3: Income + Type: Investments + Amount: 1000.00 +``` ### List expense +//TODO -### List recurring +Example output: +``` +You have 3 matching cashflows: +1: Expense + Type: Dining + Amount: 30.00 + Description: Genki Sushi +2: Expense + Type: Insurance + Amount: 800.00 + Recurring every: 365 days, starting from: Oct 30 2023 + Description: ntuc income +3: Expense + Type: Necessities + Amount: 300.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: groceries +``` +### List recurring: `list recurring` Lists all recurring cashflows. Format: `list recurring` @@ -197,7 +320,17 @@ Example of usage: `list recurring` Example output: ``` - +You have 2 matching cashflows: +1: Expense + Type: Insurance + Amount: 800.00 + Recurring every: 365 days, starting from: Oct 30 2023 + Description: ntuc income +2: Expense + Type: Necessities + Amount: 300.00 + Recurring every: 30 days, starting from: Oct 30 2023 + Description: groceries ``` ### Budget From 184d6e46721d8ea564e7b90fcb11dc146c34bb9a Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 05:20:01 +0800 Subject: [PATCH 06/12] Fix typo --- .../java/seedu/financialplanner/commands/ListCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/financialplanner/commands/ListCommand.java b/src/main/java/seedu/financialplanner/commands/ListCommand.java index ca076fdb10..c7e8b1e062 100644 --- a/src/main/java/seedu/financialplanner/commands/ListCommand.java +++ b/src/main/java/seedu/financialplanner/commands/ListCommand.java @@ -60,11 +60,11 @@ public void execute() throws Exception { } if (cashflowToBePrinted.isEmpty()) { - ui.showMessage("No matching cashflow"); + ui.showMessage("No matching cashflow."); return; } - ui.showMessage(String.format("You have %d matching cashflow:", cashflowToBePrinted.size())); + ui.showMessage(String.format("You have %d matching cashflows:", cashflowToBePrinted.size())); for (int i = 0; i < cashflowToBePrinted.size(); i += 1) { ui.showMessage((i + 1) + ": " + cashflowToBePrinted.get(i)); } From 943e7c5de6dc2dac2951409efd0e6d2effbd916d Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 05:28:49 +0800 Subject: [PATCH 07/12] Update table of contents --- docs/UserGuide.md | 50 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index eb28544379..7684f746e9 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -5,6 +5,18 @@ * [Introduction](#introduction) * [Quick start](#quick-start) * [Features](#features) + * [Add cashflow](#add-cashflow) + * [Add income](#add-income-add-income) + * [Add expense](#add-expense-add-expense) + * [Delete cashflow](#delete-cashflow-delete) + * [Delete income](#delete-income-delete-income) + * [Delete expense](#delete-expense-delete-expense) + * [Delete recurring cashflow](#delete-recurring-delete-recurring) + * [List](#list) + * [List all](#list-all-list) + * [List income](#list-income-list-income) + * [List expense](#list-expense-list-expense) + * [List recurring](#list-recurring-list-recurring) * [Budget](#budget) * [Setting budget](#setting-a-budget-budget-set) * [Updating budget](#updating-budget-budget-update) @@ -34,10 +46,10 @@ you a one-stop interface to access a plethora of features to manage your finance {Give steps to get started quickly} 1. Ensure that you have Java 11 or above installed. -1. Down the latest version of `Financial Planner` from [here](http://link.to/duke). -1. Copy the file to the folder you want to use as the *home folder* for Neo Chatbot. -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar ip.jar` command to run the application. -1. Refer to the **Features** section below for details of each command. +2. Down the latest version of `Financial Planner` from [here](http://link.to/duke). +3. Copy the file to the folder you want to use as the *home folder* for Neo Chatbot. +4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar ip.jar` command to run the application. +5. Refer to the **Features** section below for details of each command. ## Features @@ -50,7 +62,9 @@ you a one-stop interface to access a plethora of features to manage your finance e.g. `[/r DAYS]` can be used as `/r 30` or left empty. -### Add income: `add income` +### Add cashflow + +#### Add income: `add income` Adds an income source to the Financial Planner. Format: `add income /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` @@ -80,7 +94,7 @@ to the Financial Planner. Balance: 5000.00 ``` - Note: Balance displayed above is just an example. Your actual balance may differ. -### Add expense: `add expense` +#### Add expense: `add expense` Adds an expense to the Financial Planner Format: `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` @@ -117,7 +131,7 @@ Deletes a cashflow from the Financial Planner. Format: `delete INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when [`list`](#list-all) command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list`](#list-all-list) command is used. - `/r` is used to delete all **future** cashflows **only**. Example of usage: `delete 1 /r` @@ -144,12 +158,12 @@ Balance: -1130.00 ``` - Note: Balance displayed above is just an example. Your actual balance may differ. -### Delete income: `delete income` +#### Delete income: `delete income` Deletes an income from the Financial Planner. Format: `delete income INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when [`list income`](#list-income) command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list income`](#list-income-list-income) command is used. - `/r` is used to delete all **future** incomes **only**. Example of usage: `delete income 2 /r` @@ -176,12 +190,12 @@ Balance: 5170.00 ``` - Note: Balance displayed above is just an example. Your actual balance may differ. -### Delete expense: `delete expense` +#### Delete expense: `delete expense` Deletes an expense from the Financial Planner. Format: `delete expense INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when [`list expense`](#list-expense) command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list expense`](#list-expense-list-expense) command is used. - `/r` is used to delete all **future** expenses **only**. Example of usage: `delete expense 2 /r` @@ -208,12 +222,12 @@ Balance: -330.00 ``` - Note: Balance displayed above is just an example. Your actual balance may differ. -### Delete recurring: `delete recurring` +#### Delete recurring: `delete recurring` Deletes a recurring cashflow from the Financial Planner. Format: `delete recurring INDEX [/r]` -- `INDEX` refers to the index number shown in the displayed list when [`list recurring`](#list-recurring) command is used. +- `INDEX` refers to the index number shown in the displayed list when [`list recurring`](#list-recurring-list-recurring) command is used. - `/r` is used to delete all **future** recurring cashflows **only**. Example of usage: `delete recurring 2 /r` @@ -241,7 +255,9 @@ Balance: -830.00 - Note: Balance displayed above is just an example. Your actual balance may differ. ``` -### List all +### List + +#### List all: `list` // TODO Example output: @@ -268,7 +284,7 @@ You have 4 matching cashflows: Recurring every: 30 days, starting from: Oct 30 2023 Description: groceries ``` -### List income +#### List income: `list income` //TODO Example output: @@ -288,7 +304,7 @@ You have 3 matching cashflows: Type: Investments Amount: 1000.00 ``` -### List expense +#### List expense: `list expense` //TODO Example output: @@ -309,7 +325,7 @@ You have 3 matching cashflows: Recurring every: 30 days, starting from: Oct 30 2023 Description: groceries ``` -### List recurring: `list recurring` +#### List recurring: `list recurring` Lists all recurring cashflows. Format: `list recurring` From 84dafe2fbbb343206ff977905ca52d1b7efc8c15 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 12:10:01 +0800 Subject: [PATCH 08/12] Fix typos --- docs/UserGuide.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 7684f746e9..6bbd2279f4 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -46,8 +46,8 @@ you a one-stop interface to access a plethora of features to manage your finance {Give steps to get started quickly} 1. Ensure that you have Java 11 or above installed. -2. Down the latest version of `Financial Planner` from [here](http://link.to/duke). -3. Copy the file to the folder you want to use as the *home folder* for Neo Chatbot. +2. Download the latest version of `Financial Planner` from [here](http://link.to/duke). +3. Copy the file to the folder you want to use as the *home folder* for Financial Planner. 4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar ip.jar` command to run the application. 5. Refer to the **Features** section below for details of each command. @@ -559,26 +559,26 @@ Existing data will be automatically loaded when the program starts up. {Give a 'cheat sheet' of commands here} -| Action | Format | -|----------------------------------|------------------------------------------------------------| -| **Add income** | `add income /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | +| Action | Format | +|----------------------------------|-----------------------------------------------------------| +| **Add income** | `add income /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | | **Add expense** | `add expense /a AMOUNT /t TYPE [/r DAYS] [/d DESCRIPTION]` | -| **Delete cashflow** | `delete INDEX [/r]` | -| **Delete income** | `delete income INDEX [/r]` | -| **Delete expense** | `delete expense INDEX [/r]` | -| **Delete recurrence** | `delete recurrence INDEX [/r]` | -| **list all cashflows** | `list` | -| **list all incomes** | `list income` | -| **list all expenses** | `list expense` | -| **list all recurring cashflows** | `list recurrence* | -| **Set budget** | `budget set /b BUDGET` | -| **Update budget** | `budget update /b BUDGET` | -| **Reset budget** | `budget reset` | -| **Delete budget** | `budget delete` | -| **View budget** | `budget view` | -| **Display Overview** | `overview` | -| **View balance** | `balance` | -| **Exit program** | `exit` | +| **Delete cashflow** | `delete INDEX [/r]` | +| **Delete income** | `delete income INDEX [/r]` | +| **Delete expense** | `delete expense INDEX [/r]` | +| **Delete recurrence** | `delete recurrence INDEX [/r]` | +| **list all cashflows** | `list` | +| **list all incomes** | `list income` | +| **list all expenses** | `list expense` | +| **list all recurring cashflows** | `list recurrence` | +| **Set budget** | `budget set /b BUDGET` | +| **Update budget** | `budget update /b BUDGET` | +| **Reset budget** | `budget reset` | +| **Delete budget** | `budget delete` | +| **View budget** | `budget view` | +| **Display Overview** | `overview` | +| **View balance** | `balance` | +| **Exit program** | `exit` | - Note: Cashflow is referring to an income or expense From ac93b149bf74c52ab090855d5204d8f6f7118339 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 12:24:48 +0800 Subject: [PATCH 09/12] Update text ui test --- text-ui-test/EXPECTED.TXT | 7 +------ text-ui-test/input.txt | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index eb1bfd89a1..91776db83d 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -2,12 +2,11 @@ Directory doesn't exist. Creating directory... Watchlist file not found... Creating Initializing New watchlist.. adding AAPL and GOOGL for your reference File not found. Creating new file... -Current date: Oct 29 2023 +Current date: Oct 30 2023 Welcome to your Financial Planner. Type something to get started. You have added an Income Type: Salary Amount: 5000.00 - Recurring every: 30 days, starting from: Oct 29 2023 Description: part time job to the Financial Planner. Balance: 5000.00 @@ -19,7 +18,6 @@ Balance: 5123.12 You have added an Expense Type: Entertainment Amount: 100.00 - Recurring every: 30 days, starting from: Oct 29 2023 Description: netflix to the Financial Planner. Balance: 5023.12 @@ -36,7 +34,6 @@ Balance: 4776.79 You have removed an Income Type: Salary Amount: 5000.00 - Recurring every: 30 days, starting from: Oct 29 2023 Description: part time job from the Financial Planner. Balance: -223.21 @@ -48,7 +45,6 @@ Balance: -100.00 You have removed an Expense Type: Entertainment Amount: 100.00 - Recurring every: 30 days, starting from: Oct 29 2023 Description: netflix from the Financial Planner. Balance: 0.00 @@ -61,7 +57,6 @@ Use Watchlist to view it! You have added an Income Type: Salary Amount: 5000.00 - Recurring every: 30 days, starting from: Oct 29 2023 to the Financial Planner. Balance: 5000.00 A monthly budget of 3000.00 has been set. diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 9c5bae1bdc..60d9e76fe5 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,6 +1,6 @@ -add income /a 5000 /t salary /r 30 /d part time job +add income /a 5000 /t salary /d part time job add income /a 123.12 /t allowance -add expense /a 100 /t entertainment /r 30 /d netflix +add expense /a 100 /t entertainment /d netflix add expense /a 123.21 /t shopping delete income 2 delete 1 @@ -8,7 +8,7 @@ delete expense 2 delete 1 addstock /s MSFT addstock /s GME -add income /a 5000 /t salary /r 30 +add income /a 5000 /t salary budget set /b 3000 budget update /b 1000 add expense /a 200 /t shopping From 1a00cd458d480c492d49724d6a170bf1aaff22cc Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 12:29:07 +0800 Subject: [PATCH 10/12] Update toString() in cashflow --- src/main/java/seedu/financialplanner/cashflow/Cashflow.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/seedu/financialplanner/cashflow/Cashflow.java b/src/main/java/seedu/financialplanner/cashflow/Cashflow.java index 739acf81a1..e4ba13f2f5 100644 --- a/src/main/java/seedu/financialplanner/cashflow/Cashflow.java +++ b/src/main/java/seedu/financialplanner/cashflow/Cashflow.java @@ -77,7 +77,8 @@ public String toString() { if (recur != 0) { string += System.lineSeparator() + " Recurring every: " + recur + " days"; - string += ", starting from: " + date.format(DateTimeFormatter.ofPattern("MMM dd yyyy")); + string += ", date added: " + date.format(DateTimeFormatter.ofPattern("MMM dd yyyy")); + string += ", recurring on: " + date.plusDays(recur).format(DateTimeFormatter.ofPattern("MMM dd yyyy")); } if (description != null) { string += System.lineSeparator() + " Description: " + description; From 0a731bad2ef28a74bad3566f002083d755c46436 Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 19:36:18 +0800 Subject: [PATCH 11/12] Remove displaying of current date upon program startup --- src/main/java/seedu/financialplanner/FinancialPlanner.java | 2 +- src/main/java/seedu/financialplanner/utils/Ui.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/seedu/financialplanner/FinancialPlanner.java b/src/main/java/seedu/financialplanner/FinancialPlanner.java index dba440ff5a..bdd75a6d00 100644 --- a/src/main/java/seedu/financialplanner/FinancialPlanner.java +++ b/src/main/java/seedu/financialplanner/FinancialPlanner.java @@ -33,7 +33,7 @@ public void run() { return; } - ui.welcomeMessage(date); + ui.welcomeMessage(); String input; Command command = null; diff --git a/src/main/java/seedu/financialplanner/utils/Ui.java b/src/main/java/seedu/financialplanner/utils/Ui.java index 95fc57cc20..f3231e74de 100644 --- a/src/main/java/seedu/financialplanner/utils/Ui.java +++ b/src/main/java/seedu/financialplanner/utils/Ui.java @@ -6,8 +6,6 @@ import seedu.financialplanner.cashflow.Budget; import seedu.financialplanner.cashflow.Cashflow; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; import java.text.SimpleDateFormat; import java.util.Map; import java.util.Scanner; @@ -49,8 +47,7 @@ public void showMessage(String message) { System.out.println(message); } - public void welcomeMessage(LocalDate date) { - System.out.println("Current date: " + date.format(DateTimeFormatter.ofPattern("MMM dd yyyy"))); + public void welcomeMessage() { showMessage("Welcome to your Financial Planner. Type something to get started."); } From 1b0201f634d259d884e552d7bb1a576b83125dfe Mon Sep 17 00:00:00 2001 From: NeoMinWei <> Date: Mon, 30 Oct 2023 19:36:29 +0800 Subject: [PATCH 12/12] Update text ui test --- text-ui-test/EXPECTED.TXT | 1 - 1 file changed, 1 deletion(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 91776db83d..b95506d485 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -2,7 +2,6 @@ Directory doesn't exist. Creating directory... Watchlist file not found... Creating Initializing New watchlist.. adding AAPL and GOOGL for your reference File not found. Creating new file... -Current date: Oct 30 2023 Welcome to your Financial Planner. Type something to get started. You have added an Income Type: Salary