Skip to content

Commit

Permalink
Merge branch 'master' into junRong-DG-Update
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/DeveloperGuide.md
#	src/main/java/seedu/budgetbuddy/Storage.java
#	src/main/java/seedu/budgetbuddy/commons/CurrencyConverter.java
  • Loading branch information
itsmejr257 committed Apr 13, 2024
2 parents 997b0b5 + b6c9284 commit 0f324b4
Show file tree
Hide file tree
Showing 47 changed files with 1,307 additions and 644 deletions.
3 changes: 3 additions & 0 deletions data/BudgetFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Transport|100.00
Groceries|1000.00
Housing|100.00
2 changes: 1 addition & 1 deletion data/DefaultCurrency.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Default Currency: SGD
Default Currency: USD
2 changes: 0 additions & 2 deletions data/ExpenseFile.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
2024-04-07 | Transport | 100.00 | bus
2024-04-07 | Transport | 60.00 | train
Empty file added data/SplitExpensesFile.txt
Empty file.
403 changes: 206 additions & 197 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

49 changes: 36 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,45 @@ Example of usage:
`menu 1` : Displays commands related to feature associated to menu list item 1

### Add Expense
Adds new expense
Records a new expense under a specific category with a detailed description.

Format: `add expense c/CATEGORY a/AMOUNT d/DESCRIPTION`

* Increments expense of the specified CATEGORY by AMOUNT given.
* The `CATEGORY` must be one of the following pre-defined categories: "Housing",
"Groceries", "Utility", "Transport", "Entertainment" or "Others".
* The `AMOUNT` must be a positive integer.
* The `DESCRIPTION` can be any string.
* The category under which the expense is to be recorded. It must match one of the
pre-defined categories exactly (not case-insensitive):
Housing
Groceries
Utility
Transport
Entertainment
Others
* The `AMOUNT` is the amount to add to the expense. It must be a positive number and can include
up to two decimal places.
* The `DESCRIPTION` is a brief description of the expense. Accepts any text string.

Example of Usage:

`add expense c/Entertainment a/167 d/Bruno Mars`


### Add Savings
Increase savings by specified amount to the savings list
Adds a specified amount to the savings under a particular category.

Format: `add savings c/CATEGORY a/AMOUNT`

* Increments savings of the specified CATEGORY by AMOUNT given.
* The `CATEGORY` must be one of the following pre-defined categories: "Salary",
"Investments", "Gifts" or "Others".
* The `AMOUNT` must be a positive integer.
* The `DESCRIPTION` can be any string.
* The category for the savings increment. It must be one of the pre-defined
categories (not case-insensitive):
Salary
Investments
Gifts
Others
* The `AMOUNT` is the amount to add to the savings. It must be a positive number
and can include up to two decimal places.

Example of Usage:

`add savings c/Salary a/500.50`

### Add Split Expenses
Add expenses that are meant for splitting among friends or colleague
Expand Down Expand Up @@ -254,6 +268,9 @@ Format `settle i/Index`
* The system will settle the splitted expense corresponding to `Index`
* `Index` must be a positive integer

Example of usage:
`settle i/2`: Delete splitexpense of index 2 listed in splittedexpenses tracker

### Finding expenses : `find expenses`

Finds expenses based on their description or amount
Expand Down Expand Up @@ -459,20 +476,26 @@ Format: `print budget`
* This feature provides an overview of the expenses distribution across different categories.
* A horizontal bar graph showing the percentage of total expenses attributed to each category.
* It highlights the category with the highest expenses, the one with the lowest (excluding categories with no expenses),
* and lists any categories where no expenses have been recorded.
and lists any categories where no expenses have been recorded.
* Categories are Housing, Groceries, Utility, Transport, Entertainment, and Others.

Example of usage: `get expenses insights`

Example of Expected Output:
![GetExpenseInsights.png](userguideimages%2FGetExpenseInsights.png)

### Get Graphical Insights for savings: `get savings insights`
* This feature offers a comprehensive look at how your savings are allocated across various categories.
* A horizontal bar graph showing the percentage of total savings attributed to each category.
* It highlights the category with the highest savings, the one with the lowest (excluding categories with no savings),
* and lists any categories where no savings have been added.
and lists any categories where no savings have been added.
* Categories are Salary, Investments, Gifts, and Others

Example of Usage: `get savings insights`

Example of Expected Output:
![GetSavingsInsights.png](userguideimages%2FGetSavingsInsights.png)


### Saving the data

Expand Down
Binary file removed docs/diagrams/SequenceDiagram_addSavings.png
Binary file not shown.
Binary file added docs/diagrams/sequenceDiagram_AddExpense.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/diagrams/sequenceDiagram_AddExpense.png
Binary file not shown.
Binary file added docs/diagrams/sequenceDiagram_AddSaving.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagrams/sequenceDiagram_SplitExpense.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagrams/sequenceDiagram_listBudget.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 added docs/diagrams/sequenceDiagram_setBudget.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions docs/team/dheekshitha2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Murali Krishnan Dheekshitha's Project Portfolio Page

## Project: BudgetBuddy
BudgetBuddy is a product for users who wish to handle and track any current/future expenses on a singular platform.
BudgetBuddy provides a faster and more efficient way to track and calculate expenses and provides the ability to deal
with finances on a singular platform with ease. It has multiple financial tracking options to suit your needs.

## Summary of Contributions
My primary contributions include developing the budget setting functions, and enabling users to delete their expenses
or reduce their savings, thereby improving the app's usability and user experience.

### New Feature: Added the ability to set and manage budget
- **What it does:** Allows users to set and adjust budgets for various categories such as groceries, transport, and
housing. Users can define a maximum spending limit for each category, which helps in monitoring and controlling
their expenditures.
- **Justification:** This feature is pivotal for users aiming to adhere to their financial goals, and ensure that they
do not overspend in any category
- **Highlights:** Implementing this feature requires a deep understanding of the app's different functions and how they
all work together. One challenge of implementing this feature was integrating existing functions like `Expenses` so that
I am able to retrieve the relevant expense information to check if the user is still within their budget.
- **Credits:** (to be updated)

### New Feature: Added the ability to delete expenses
- **What it does:** Allows users to delete expenses that have been added wrongly or are outdated
- **Justification:** This feature improves the app's flexibility by allowing users to correct their mistakes, ensuring
that their financial records remain accurate

### New Feature: Added the ability to reduce savings
- **What it does:** Enables users to record when they withdraw or spend from their savings, updating savings accordingly
- **Justification:** Essential for maintaining an accurate record of savings, especially when savings are used to cover
unexpected expenses or large purchases

## Code contributed
(RepoSense link)

## Enhancements to existing features
- (to be updated)
67 changes: 67 additions & 0 deletions docs/team/jasraa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Jasra Zainab's Project Portfolio Page

## Project: Budget Buddy
BudgetBuddy is a streamlined finance-tracking application designed for efficient management of current and future
expenses on a single platform. BudgetBuddy simplifies expense tracking and calculations, making financial management
both quick and intuitive. With budgeting features implemented, Budget Buddy is a well-rounded financial management
application that is user-friendly.

### Summary of Contributions
Given below are my contributions to the project

#### New Feature: Added the ability to edit expenses
- **What it does:** Allows users to edit expenses that have already been added. Users have to specify the index of the
expense they want to edit, and they can edit the Category, Amount and Description of the expense.
- **Justification:** This feature enables to users to correct any mistakes they may have made while adding an expense.
Thus, improving the apps accuracy in managing finances since users are able to update the most correct information.

#### New Feature: Added the ability to edit savings
- **What it does:** Allows users to edit savings that have already been added. Users have to specify the index of the
saving they want to edit, and they can edit the Category, Amount and Description of the saving.
- **Justification:** This feature enables to users to correct any mistakes they may have made while adding a saving.
Thus, improving the apps accuracy in managing finances since users are able to update the most correct information.

#### New Feature: Added the ability to save and load expenses and savings
- **What it does:** This feature allows users to save the state of their financial data such as their expenses and
savings added and load them back at their convenience. Information such as the Index, Category, Amount and Description
will be saved. This ensures continuity in financial tracking even after closing the application.
- **Justification:** This enhancement is critical for maintaining the integrity of financial records over multiple
sessions. Users can confidently close BudgetBuddy, knowing they can pick up exactly where they left off, making
financial management more seamless and user-friendly.

#### New Feature: Added the ability to get graphical insights for Expenses and Savings
- **What it does:** This feature presents a visual representation of users' financial data, displaying expenses and
savings as horizontal bar graphs. It gives users a quick and clear picture of their spending and saving patterns,
enabling them to identify the largest and smallest categories at a glance.
- **Justification:** The visual summary of expenses and savings helps users better understand their financial habits
without delving into the details. The ability to see which categories take up most of their budget and where they are
saving effectively can be crucial for making informed decisions about financial planning. This addition enhances the
user experience by providing a more interactive and engaging way to engage with their financial data.
- **Highlights:** The feature includes a neat, aligned graphical output where each category is represented by a
proportional bar filled with hash symbols (#). It also includes key insights like the highest and lowest expense and
saving categories, as well as any categories that haven't been added to, ensuring users have a comprehensive view of
their financial status.
- **Usage:** Users can access this graphical summary by entering specific commands to retrieve insights on their
expenses or savings. The system will then calculate and display the information in an easy-to-read bar graph format
within the command line interface, eliminating the need for external tools or visualisation software.

#### Code Contributed
[RepoSense Link](https://nus-cs2113-ay2324s2.github.io/tp-dashboard/?search=jasraa&breakdown=true&sort=groupTitle%20dsc&sortWithin=title&since=2024-02-23&timeframe=commit&mergegroup=&groupSelect=groupByRepos&checkedFileTypes=docs~functional-code~test-code~other)

#### Enhancements to existing features
1. Wrote Junit tests for Edit Expenses, Edit Savings, Get Expenses Insight and Get Savings Insights
2. Implemented Bug fixes for "Edit Expenses", "Edit Savings", "Storage", "Get Expenses Insights" and
"Get Savings Insights"

#### Contributions to the UG
Added documentation for the features `edit expense`, `edit savings`, `get expenses insight`
and `get savings insights`

#### Contributions to the DG
Added diagrams and documentation for the features `edit expense`, `edit savings`, `get expenses insight`
and `get savings insights`

#### Community
1. Communicated with teammates for ideation and enhancement of existing features.
2. Provided DG Peer Review Comments for another team. [CS2113-T15-3 SplitLiang](https://github.com/nus-cs2113-AY2324S2/tp/pull/47)
3. Reported bugs for another team during PE-D. [CS2113-T15-1 LongAh](https://github.com/AY2324S2-CS2113-T15-1/tp/releases)
17 changes: 17 additions & 0 deletions docs/team/yyangdaa.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,21 @@ docs~functional-code~test-code~other)

#### Enhancements to existing features:
1. Wrote JUnit tests for the ExpenseList, SavingsList, SplitExpenseList and Parser.
- Implemented Logging/Assertions for improved error handling. (Pull Requests : [#45](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/45),
[#56](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/56)).

#### Developer Guide
- Added implementation details of the `AddExpense`, `AddSaving` and `SplitExpense` feature. (Pull Requests : [#207](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/207)).
- Added design details of the `AddExpense`, `AddSaving`, `SplitExpense`, `SplitExpenseList` and `SettleSplitExpenseList` classes.
(Pull Requests : [#207](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/207)).
- Added user stories for my respective features. (Pull Requests : [#207](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/207)).
- Added Sequence Diagrams for `AddExpense`, `AddSaving` and `SplitExpense` features. (Pull Requests : [#207](https://github.com/AY2324S2-CS2113-T12-3/tp/pull/207)).

### Community

#### Reported Bugs and Suggestions for Other Teams
- Provided 4 DG Peer Review Comments for another team. ([Team #1](https://github.com/nus-cs2113-AY2324S2/tp/pull/25)).
- Reported 5 Bugs for another team during PE-D. ([Team #1](https://github.com/nus-cs2113-AY2324S2/tp/pull/54)).

### Tools
- Usage of Draw.io for my Sequence Diagrams. ([Draw.io](https://draw.io/)).
Binary file added docs/userguideimages/GetExpenseInsights.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 added docs/userguideimages/GetSavingsInsights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/main/java/seedu/budgetbuddy/BudgetBuddy.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public class BudgetBuddy {
private Storage expensesStorage;
private Storage savingsStorage;
private Storage recurringExpensesStorage;
private Storage splitexpensesStorage;
private Storage defaultCurrency;
private Storage budgetStorage;



Expand All @@ -35,8 +37,9 @@ public BudgetBuddy() {
expensesStorage = new Storage("./data/ExpenseFile.txt");
savingsStorage = new Storage("./data/SavingsFile.txt");
recurringExpensesStorage = new Storage("./data/RecurringExpensesFile.txt");
splitexpensesStorage = new Storage("./data/SplitExpensesFile.txt");
defaultCurrency = new Storage("./data/DefaultCurrency.txt");

budgetStorage = new Storage("./data/BudgetFile.txt");
}

public void handleCommands(String input) {
Expand All @@ -53,6 +56,8 @@ public void handleCommands(String input) {
expensesStorage.saveExpenses(expenses.getExpenses());
savingsStorage.saveSavings(savings.getSavings());
recurringExpensesStorage.saveRecurringExpenses(recurringExpenseLists);
budgetStorage.saveBudgets(expenses.getBudgets());
splitexpensesStorage.saveSplitExpenses(splitexpenses.getSplitExpenses());

defaultCurrency.saveCurrency();
} catch (IOException e) {
Expand All @@ -71,8 +76,9 @@ public void run() {
defaultCurrency.loadCurrency();
this.expenses.getExpenses().addAll(expensesStorage.loadExpenses());
this.savings.getSavings().addAll(savingsStorage.loadSavings());
this.splitexpenses.getSplitExpenses().addAll(splitexpensesStorage.loadSplitExpenses());
this.recurringExpenseLists = recurringExpensesStorage.loadRecurringExpensesList();

this.expenses.getBudgets().addAll(budgetStorage.loadBudgets());

} catch (FileNotFoundException e) {
System.out.println("No existing files found. Starting fresh.");
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/seedu/budgetbuddy/Parser.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package seedu.budgetbuddy;

import seedu.budgetbuddy.command.Command;
import seedu.budgetbuddy.command.ListBudgetCommand;
import seedu.budgetbuddy.commandcreator.ListBudgetCommandCreator;
import seedu.budgetbuddy.commandcreator.CommandCreator;
import seedu.budgetbuddy.commandcreator.AddExpenseCommandCreator;
import seedu.budgetbuddy.commandcreator.AddSavingCommandCreator;
Expand Down Expand Up @@ -152,10 +152,6 @@ public Boolean isSettleSplitExpenseCommand(String input) {
return input.startsWith("settle");
}

public Command handleListBudgetCommand(ExpenseList expenseList) {
return new ListBudgetCommand(expenseList);
}

public Boolean isGetExpensesInsightsCommand(String input) {
return input.equalsIgnoreCase("get expenses insights");
}
Expand Down Expand Up @@ -234,8 +230,8 @@ public Command parseCommand(ExpenseList expenses, SavingList savings, SplitExpen
}

if (isConvertCurrencyCommand(input.toLowerCase())) {
CommandCreator commandCreator = new ChangeCurrencyCommandCreator(input, savings, expenses, expensesList,
new CurrencyConverter());
CommandCreator commandCreator = new ChangeCurrencyCommandCreator(input, savings, expenses, splitexpenses,
expensesList, new CurrencyConverter());
return commandCreator.createCommand();
}

Expand All @@ -258,9 +254,9 @@ public Command parseCommand(ExpenseList expenses, SavingList savings, SplitExpen
return commandCreator.createCommand();
}
if (isListBudgetCommand(input)){
return handleListBudgetCommand(expenses);
CommandCreator commandCreator = new ListBudgetCommandCreator(expenses);
return commandCreator.createCommand();
}

if (isGetExpensesInsightsCommand(input)) {
CommandCreator commandCreator = new GetExpenseInsightsCommandCreator(expenses);
return commandCreator.createCommand();
Expand Down
Loading

0 comments on commit 0f324b4

Please sign in to comment.