Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
1simjustin committed Apr 15, 2024
1 parent e7d20a1 commit 01998a1
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1060,11 +1060,11 @@ View the [User Guide](UserGuide.md) for the full list of UI commands and their r

### JUnit Testing

JUnit tests are written in the [`test directory`](../src/test/java/longah/) and serve to test key methods part of the application.
JUnit tests are written in the subdirectory `test` and serve to test key methods part of the application.

### Text UI Testing

Files relating to Text UI Testing can be found [here](../text-ui-test/).
Files relating to Text UI Testing can be found in the directory `text-ui-test`.

Text UI testing has been configured to simulate multiple sessions run by the same user with a total of 10 tests being run. Details of each set of tests can be found in the README in the above directory. Tests can be modified by changing command calls in the `input` subdirectory, but this is not recommended since the differing expected output may cause tests to fail.

Expand Down
66 changes: 52 additions & 14 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ A quick reference table for all commands is presented below. Certain commands ha
| View chart | `chart` | N/A |
| Exit | `exit` | N/A |

<div style="page-break-after: always;"></div>

## Table of Contents
- [LongAh! User Guide](#longah-user-guide)
- [Introduction](#introduction)
Expand Down Expand Up @@ -131,12 +133,12 @@ Apart from neatly organising users' pending transactions, LongAh! offers a varie

LongAh! streamlines debt settlement processes by automatically computing the optimal repayment strategy. By presenting users with a simplified list of debts and transactions, LongAh! minimizes the effort required to settle financial obligations within the group, fostering smoother financial interactions.

<div style="page-break-after: always;"></div>

### Security

Protecting sensitive financial data is paramount, which is why LongAh! prioritizes security. With the option to set a personalized PIN, users can safeguard their LongAh! accounts against unauthorized access. This additional layer of security ensures peace of mind, knowing that financial information remains confidential and secure. Additionally, users have the flexibility to enable, disable, or modify their PIN settings according to their preferences and needs.

<div style="page-break-after: always;"></div>

### Data Storage
LongAh! data is saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
The file is also created automatically if it does not exist.
Expand All @@ -148,21 +150,16 @@ If all is well, LongAh will save the files in the following data structure durin
├─data
│ │ groupList.txt
│ │ pin.txt
│ │
│ ├─<group 1 name>
│ │ members.txt
│ │ transactions.txt
│ │
│ ├─<group 2 name>
│ │ members.txt
│ │ transactions.txt
│ .
│ .
│ .
├─log
│ LongAh.log
└─tp.jar
```

Expand All @@ -186,7 +183,7 @@ A command has the general structure:
```

There are 5 main group of commands: 'add', 'delete', 'edit', 'find', 'list', along with other commands.
Command shortcuts are available for certain commands and are detailed below in the "format" section for relevant commands.
Command shortcuts are available for certain commands and are detailed below in the `Format` section for relevant commands.

### Viewing help: `help`

Expand All @@ -207,6 +204,8 @@ help
...
```

<div style="page-break-after: always;"></div>

### Adding a member: `add member`

Adds a new member to the list of members in LongAh!.
Expand All @@ -227,13 +226,15 @@ am Charlie
Added member: Charlie
```

<div style="page-break-after: always;"></div>

### Adding a transaction: `add transaction`

Adds a new transaction to the list of transactions in LongAh!.

Format: `add transaction [LENDER] t/[DATE IN DD-MM-YYYY HHMM] p/[BORROWER1] a/[AMOUNT] p/[BORROWER2] a/[AMOUNT] ...` OR `addt` OR `at`
* The transaction supports 1 or more borrower(s), each with custom borrowed amounts.
* `t/` is the prefix for the transaction time, and should be followed by the transaction lender and before the name of the first borrower.
* `t/` is the prefix for the transaction time, and should be followed after the transaction lender and before the name of the first borrower.
* The transaction time is optional and can be omitted.
* `p/` is the prefix for the borrower's name, and should be followed by the name of the borrower.
* `a/` is the prefix for the amount borrowed, and should be followed by the amount borrowed by that borrower from the lender.
Expand All @@ -257,6 +258,8 @@ add transaction Alice t/11-11-2000 2359 p/Bob a/10
Borrower 1: bob Owed amount: $10.00
```

<div style="page-break-after: always;"></div>

### Adding a new group `add group`

Adds a new group to LongAh! for you to manage expenses and debts separately for different groups of people.
Expand All @@ -278,6 +281,8 @@ ag Tiktok
Added group: Tiktok
```

<div style="page-break-after: always;"></div>

### Listing all members: `list members`

Shows a list of all current members in the group along with their current balances.
Expand All @@ -301,6 +306,8 @@ lm
bob: -$5.0
```

<div style="page-break-after: always;"></div>

### Listing all transactions: `list transactions`

Shows a list of all transactions in LongAh!.
Expand All @@ -323,6 +330,8 @@ lt
Borrower 1: bob Owed amount: 5.00
```

<div style="page-break-after: always;"></div>

### Listing all debts: `list debts`

Calculates the simplest way to repay all debts between all members and shows a list of all debts in LongAh!.
Expand All @@ -345,6 +354,8 @@ ld
bob owes alice $2.0
```

<div style="page-break-after: always;"></div>

### Listing all groups: `list groups`

Shows a list of all groups in LongAh!.
Expand All @@ -366,6 +377,8 @@ lg
3. Family
```

<div style="page-break-after: always;"></div>

### Find Transactions: `find transactions`

Finds all transactions that involves the specified member. The member can be involved as a lender or a borrower in the transaction(s).
Expand Down Expand Up @@ -393,6 +406,8 @@ ft Alice
Borrower 1: Alice Owed amount: $3.00
```

<div style="page-break-after: always;"></div>

### Find Lender `find lender`

Finds all transactions where the specified member is the lender.
Expand All @@ -413,6 +428,8 @@ fl Alice
Borrower 1: Bob Owed amount: $5.00
```

<div style="page-break-after: always;"></div>

### Find Borrower `find borrower`

Finds all transactions where the specified member is a borrower.
Expand All @@ -433,6 +450,8 @@ fb Alice
Borrower 1: Alice Owed amount: $3.00
```

<div style="page-break-after: always;"></div>

### Find Debts `find debts`

Finds all debts that the specified member has with other members.
Expand All @@ -457,6 +476,8 @@ fd Alice
Alice owes Charlie $5.0
```

<div style="page-break-after: always;"></div>

### Deleting a member: `delete member`

Deletes a member from the list of members in the group.
Expand All @@ -474,6 +495,8 @@ dm Alice
Deleted member: Alice
```

<div style="page-break-after: always;"></div>

### Deleting a transaction: `delete transaction`

Deletes a transaction from the list of transactions in the group.
Expand All @@ -495,6 +518,8 @@ dt 3
Borrower 1: Bob Owed amount: $10.00
```

<div style="page-break-after: always;"></div>

### Deleting a group `delete group`

Deletes a group from LongAh!.
Expand All @@ -519,6 +544,8 @@ dg friends
Deleted group: friends
```

<div style="page-break-after: always;"></div>

### Editing a member: `edit member`

Edits the name of a member in the list of members in LongAh!.
Expand All @@ -535,6 +562,8 @@ edit member Alice p/Bob
Member name edited successfully! Alice is renamed to: Bob
```

<div style="page-break-after: always;"></div>

### Editing a transaction: `edit transaction`

Edits the details of a transaction in the list of transactions in LongAh!.
Expand Down Expand Up @@ -562,6 +591,8 @@ et 1 Bob p/Alice a/3
Borrower 1: Alice Owed amount: $3.00
```

<div style="page-break-after: always;"></div>

### Enabling the user PIN: `pin enable`

Enables user PIN authentication for the application. (disabled by default)
Expand Down Expand Up @@ -601,6 +632,8 @@ pin reset
PIN saved successfully! You can enter 'pin enable' to enable authentication upon startup.
```

<div style="page-break-after: always;"></div>

### Clearing all transactions `clear`

Clear all previous transactions logged in the group. Members balances will be reset to 0.
Expand All @@ -625,6 +658,8 @@ y
All transactions have been cleared for this account.
```

<div style="page-break-after: always;"></div>

### Settle a user's debts: `settleup`

Settles all debts of the specified member with all other members. A transaction will be created to settle the debts and reset
Expand Down Expand Up @@ -661,6 +696,8 @@ settle bob
bob has no more debts!
```

<div style="page-break-after: always;"></div>

### Switching groups: `group`

Switches to the specified group in LongAh!.
Expand All @@ -679,6 +716,8 @@ group friends
You are now managing: friends
```

<div style="page-break-after: always;"></div>

### Filter transactions: `filter`

Filters transactions based on the date & time of dated transactions.
Expand Down Expand Up @@ -738,6 +777,8 @@ filter 01-01-2024 2359 //filtering transactions matching a specified date & time
Borrower 1: bob Owed amount: $3.00
```

<div style="page-break-after: always;"></div>

### Views the balances of all members on a chart: `chart`

Shows a chart of the balances of all members in the group.
Expand All @@ -764,6 +805,8 @@ A separate tooltip will show the exact balance of each member.

![viewChart.png](diagrams/viewChart.png)

<div style="page-break-after: always;"></div>

### Exiting the application: `exit`

Exits the application.
Expand Down Expand Up @@ -794,11 +837,6 @@ the desired operation. For e.g.
lsit transactions
Invalid command. Use 'help' to see the list of commands.
```
Or
```
filter 23-Nov-2022 11:59
Invalid DateTime format. Please format you date and time inputs in the form of DD-MM-YYYY HHmm
```
This could be potentially caused by
* Misspelled Action keywords (e.g. lsit transactions instead of list transactions)
* Absence of required user parameters
Expand Down

0 comments on commit 01998a1

Please sign in to comment.