Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LimZiJia authored Mar 25, 2024
1 parent 693ec5c commit d631ac1
Showing 1 changed file with 35 additions and 12 deletions.
47 changes: 35 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
# Transaction Balancer
If you have a group that takes turns to pay and split the bill later, this is the program for you!
You can add a transactions to the program everytime someone pays and balancing the payments is as easy as typing `calculate`.
Also, don't worry about entering every transaction in one session because it is automatically saved for you!

## Features
* Add as many transactions as you want! They will be aggregated per person automatically.
* Every `add` and `delete` automatically saves your transaction list.
* Saved transaction list is loaded automatically on start up.
* You can `list` all transactions to view the current transaction list.
* delete all!` is useful to reset the program for next time.


# Setup
1. Download the latest release from ![]()
2. Move the `.jar` file to your desired directory
3. `cd` your terminal into the directory containing your `.jar` file
4. Run the application by typing `java -jar filename.jar` into th teterminal
1. Make sure you have Java 11 or above installed in your computer
2. Download the latest ![release]()
3. Move the `.jar` file to your desired directory
4. `cd` your terminal into the directory containing your `.jar` file
5. Run the application by typing `java -jar filename.jar` into th teterminal

# Commands
For the command formats below, lower cases are the keywords and CAPS are the user inputs.

### `add`
Format: `add NAME AMOUNT`<br>
The add commands adds a transaction that NAME has made during the trip.<br>
TIP: If the input is wrong, you can either use the `delete` command or `add NAME -AMOUNT` to correct it. You can also check the list of transactions using the `list` command.

Format: `add NAME AMOUNT`<br>

**TIP:** If the input is wrong, you can either use the `delete` command and `add NAME AMOUNT` again, or `add NAME -AMOUNT` to correct it. You can also check the list of transactions using the `list` command.

### `list`
Format: `list`<br>
Prints list of transactions. Each person's contribution will be aggregated.
Prints list of transactions. Each person's contribution will be aggregated.<br>

Format: `list`

### `delete`
Format: `delete NAME`<br>
Deletes entries in the transaction table with NAME.
Deletes entries in the transaction table with NAME.<br>
Deletes all enties if argument is `all!`<br>

Format: `delete NAME` or `delete all!`<br>

### `calculate`
Prints out the final list of (the minimum number of) transactions that are required to resolve the balancing of funds.<br>

Format: `calcuate`<br>
Prints out the final list of (the minimum number of) transactions that are required to resolve the balancing of funds.

NOTE: If somebody did not contribute anything throughout the trip, do `add NAME 0` to include him/her into the calculation.
Similarly, if somebody should not be included in the final transaction, they should not have an entry in the transactions list. Do `delete NAME` to remove them.

### `exit`
Exits the program<br>

Format: `exit`<br>
Exits the program

0 comments on commit d631ac1

Please sign in to comment.