-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113-F13-2] BrokeMan #51
base: master
Are you sure you want to change the base?
Changes from 180 commits
a382e5e
5dc939e
8799059
ef38c4a
5aec75a
2e2e987
a593cbc
3e52928
cb0f1d4
6527fac
329b632
0e69216
e543531
fb305b6
9ead250
1939efa
547b447
95530bf
82aac8f
b0ce5cf
8a8ced2
4f219b7
dece3a3
27515d4
2f06c81
6be16a8
6d22cbc
a6e0538
d9cdaf0
d993104
bf7cfdf
07e8748
7ec9003
ef52e74
2178ee5
9f29430
1a928a4
f74297f
ed62329
baa05b2
a1ad8f6
27b8534
ef88079
00b6003
7bf465b
13abc0e
54d8b8e
bc44722
94255f7
1d45d2e
1d96f34
cc7362d
b2e66bf
209244d
2d2c2eb
8616f78
bdfed62
9dbf6e5
52388a0
2b0468b
efbdc7a
7d9f6ab
e2e2abb
1496062
ef10749
7299b23
ea02332
655e924
55c2d52
5c2d377
98c4973
151ac13
d2e3187
7021c33
b0adcac
237a975
2c93593
f2f1f4f
0942978
9d70704
293a1d1
83e9367
f5f2a5b
a940f23
d522927
86abf97
d0f5239
39b8054
1a9d762
9765d4a
62d6bb2
bda6b9d
0a84bb3
d8da7a6
44a6c22
2fcf6b4
65b0dbe
3ddc1ad
c227d84
6bead31
92cb80d
0e3488a
79b463a
cdc1dbc
cb5f69c
ca76250
e68d493
12586c8
3526155
756a46d
0d28fcf
95a114f
b44c5ff
d10a1f7
ed21c3a
dca5d16
b20b95e
a535289
9360d66
4ce1fb8
d60b3ba
2ad2377
cc9e3b2
3ada9cb
2736f78
b8864ae
345dd86
345f1c8
9e0aa6f
d7b37fd
ae017cc
982e510
c47a18f
093535e
efeb086
737dd17
b60a003
eae9b84
91ff609
307e83d
17b5ee3
faebaec
d2727b8
6b78032
3cb38f0
41d6a92
f6d5943
00f8614
da8b11a
9a8b240
01b8b0b
794132c
57d0614
016d71e
c5bbbe2
d979797
a47912f
ca1ec8a
ae2b063
a92fea0
7efa96f
863b420
de7b36f
4bdf4fc
c11127c
c8c626b
eaa96a5
7f449a0
4baa574
bcbcc6e
f57f83c
2faa2e0
78fb763
d2705ea
a450ae0
2ce6d99
a25f0c2
af79552
6e023f4
77c1f98
7c679a5
70c924d
32a42c7
e337077
2694473
2bda6c3
ada68d2
33e53ca
66fd211
bd9103a
b5326c9
20c949f
2aa4889
5e62653
e93acd7
6c7240b
936f165
8cf5e45
0eedaa8
8effc32
5644062
07fa464
c00c3ff
19e2dfd
c3b74c6
6e91979
7a619a1
fb2d078
a9cef23
cfdd135
8c59177
6266cb2
15f7089
b7eba58
0e75010
7c37e43
0589eab
c1cabf6
bf863a7
403f697
ceac7b2
6067fcf
dd06f95
92430b8
11bdbc7
79e4fc3
3cecba8
258863c
b916ae1
72e9066
4681e65
4501284
8038b7a
f38c603
db2155f
46a5ab1
9797465
27677e6
834f42a
192e185
4e0d340
4d8770c
0df51c7
b1e4253
020f182
44cfc43
0966b3d
a85966d
6eff9f9
af30554
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: seedu.brokeMan.BrokeMan | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# About us | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
| Display | Name | Github Profile | Portfolio | | ||
|-----------------------------------------------------|:------------------:|:-----------------------------:|:---------------------------------:| | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Yu Sichen | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Liam Van | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Samuel Tan Sze Wee | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Sangjun Nam | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,251 @@ | ||
# Developer Guide | ||
|
||
## Table of Contents | ||
|
||
1. [Acknowledgements](#acknowledgements) | ||
2. [Design](#design) | ||
- [Architecture](#architecture) | ||
- [UI component](#ui-component) | ||
- [Parser component](#parser-component) | ||
- [Storage component](#storage-component) | ||
- [Common classes](#common-classes) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link here for the common classes does not seem to be working, perhaps edit the content in the link bracket to be #common-class for it to work? |
||
3. [Implementation](#implementation) | ||
4. [Appendix: Requirements](#appendix--requirements) | ||
5. [Appendix: Instructions for manual testing](#appendix--instructions-for-manual-testing) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 2 links also do not seem to work when I clicked it, perhaps consider changing the '--' to '-' after 'appendix'? |
||
|
||
--- | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the | ||
original source as well} | ||
|
||
- [addressbook-level2](https://github.com/se-edu/addressbook-level2) | ||
- [addressbook-level3](https://github.com/se-edu/addressbook-level3) | ||
|
||
--- | ||
|
||
## Design | ||
|
||
### Architecture | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Architecture diagram is clear and well explained |
||
|
||
![Architecture Diagram](images/ArchitectureDiagram.png) | ||
|
||
The ***architecture diagram*** given above is explains the high level design of the program. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seems to be a typo in this sentence There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may add the Main class to the diagram |
||
|
||
Given below is a quick overview of the main components and how they interact with each other. | ||
|
||
**Main components of architecture** | ||
|
||
`BrokeMan` has one class [`Main`](https://github.com/AY2223S2-CS2113-F13-2/tp/blob/master/src/main/java/seedu/brokeMan/BrokeMan.java), which is responsible for: | ||
- At program launch: Initialises the components in the correct sequence, and connect them up with each other | ||
- At program termination: Shuts down the components and invokes cleanup methods where necessary. | ||
|
||
[`Common`](#common-class) represents a collection of messages used by multiple other components. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
The rest of the program consists of mainly 5 main components. | ||
- [`Ui`](#ui-component): The Ui of the program. | ||
- [`Parser`](#parser-component): The user input parser. | ||
- [`Command`](#command-component): The command executor. | ||
- [`Storage`](#storage-component): Reads data from, and writes data to hard disk. | ||
- [`EntryList`](#entrylist-component): Stores the list of entries when program is running. | ||
|
||
### Ui component | ||
|
||
### Parser component | ||
|
||
### Command component | ||
|
||
### Storage component | ||
|
||
### EntryList component | ||
|
||
### Common class | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part is empty, you might want to delete or add the sequence diagrams for each component |
||
|
||
Messages used by multiple components are in the `seedu.brokeMan.commmon` package. | ||
|
||
--- | ||
|
||
## implementation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "i" is in lowercase There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can consider to change it to "Implementation" instead |
||
|
||
### Entry | ||
|
||
Entry class is the underlying superclass for Expense and Income classes. It establishes the common attributes and | ||
methods that are necessary to represent Expenses and Incomes. Abstract class is used to represent their common features | ||
to maximize code reusability and increase maintainability. | ||
|
||
Private attributes | ||
|
||
Info: String that stores the description of the entry | ||
|
||
Amount: Double that stores the monetary value of entry | ||
|
||
Time: LocalDateTime that stores the date and time of entry | ||
|
||
Category: Category that stores the type tag of entry | ||
|
||
**Methods** | ||
|
||
Getters can be used to provide the private attributes to other classes | ||
|
||
editDescription(), editAmount(), editTime(), editCategory() | ||
|
||
* Takes in corresponding parameters to edit the private attributes. | ||
* Used by EntryList to make edits | ||
|
||
isSameMonth() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice work having a short summary as a description, can consider bolding "Private attributes" to make it aligned in formatting with the "Methods" that you already bolded below. |
||
|
||
## Design & implementation | ||
* Takes in Integer year and Month month and returns if the entry is made in the date specified by parameters. | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
### EntryList | ||
|
||
The EntryList class represents a collection of Entry instances. It is an abstract class that serves as a superclass for | ||
ExpenseList and IncomeList classes, providing common functionalities to minimize repetitive code and easing code | ||
maintenance. It provides underlying methods for adding, removing, editing, and listing entries from the list, which can | ||
be expenses or incomes depending on the subclass. | ||
|
||
## Product scope | ||
### Target user profile | ||
On top of the methods that provide basic functionality of expense/income lists, the EntryList class provides additional | ||
methods such as summing all entries or filtering the entries according to LocalDate provided to the method. Most methods | ||
of EntryList take in a List<Entry>, which is because it has to operate on a list of expenses or incomes passed by the | ||
IncomeList or ExpenseList subclasses. | ||
|
||
{Describe the target user profile} | ||
**Methods** | ||
|
||
### Value proposition | ||
addEntry() | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
* Takes an Entry instance as a parameter and adds it to the class-level list | ||
|
||
## User Stories | ||
listEntry() | ||
|
||
|Version| As a ... | I want to ... | So that I can ...| | ||
|--------|----------|---------------|------------------| | ||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
* Takes in a list of Entry and passes them to the UI to print to the user. | ||
* Makes use of toString() method of entries. | ||
|
||
## Non-Functional Requirements | ||
deleteEntry() | ||
|
||
* Takes in the list of entry and index of the entry to be deleted. | ||
* The method acts as an underlying method for subclasses' deletion methods. | ||
|
||
editEntry() | ||
|
||
* Overloaded method. All methods take in the LinkedList of entries and the index of the entry that has to be edited. | ||
Another parameter has to be provided, which can be double, LocalDateTime, or String. | ||
* additional parameter double edits the money amount of the entry in the list. | ||
* additional parameter LocalDateTime edits the time when the entry is made. | ||
* additional parameter String edits the description of the entry in the list. | ||
|
||
getTotalAmount() | ||
|
||
* Takes in a list of entries and returns the sum of all entry's monetary value. | ||
|
||
SortEntryByAmount() | ||
|
||
* Returns a sorted list of entry by amount of entry. | ||
|
||
SortEntryByDate() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these 2 methods meant to be written as |
||
|
||
* Returns a sorted list of entry by date of entry. | ||
|
||
findEntriesByCategory() | ||
* Returns a list of entries with the same category and the total amount in this category. | ||
|
||
### ExpenseList, IncomeList | ||
|
||
Classes ExpenseList and IncomeList is responsible for keeping track of the corresponding entry instances added to the program by the user. | ||
At a class level, it keeps a **LinkedList** of corresponding entries. | ||
They both extend EntryList, the abstract class that represents a collection of Entry instances. | ||
It provides static functionalities of managing and viewing entry instances at a class level. | ||
Instances of ExpenseList and IncomeList are not created as all functionalities can be provided at the class level. | ||
|
||
**Methods** | ||
|
||
listExpense() / listIncome() | ||
|
||
* Overloaded method, may take it no parameter or LocalDate parameter | ||
* If it has no passed parameters, it returns all entries in the list | ||
* If a LocalDate is passed, it returns all entries made in the month specified by LocalDate instance. | ||
|
||
### Budget | ||
|
||
The Budget class represents the user’s monthly budget. The class utilize class-level hashmaps to represent the monthly | ||
budget, using outer key year and inner key month. It provides a method to set and view budget for different months. | ||
|
||
It makes use of a static HashMap<Integer, HashMap<Month, Double>> to keep track of monthly budget. If the user tries to | ||
access budget using keys that are not entered in the HashMap, it will return a warning mentioning that the inquired | ||
budget has not been set yet. | ||
|
||
### SaveExpense, SaveIncome | ||
|
||
The SaveExpense and SaveIncome class deal with saving in the user inputted data locally so that it can be later accessed. | ||
**Methods** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
writeFile(LinkedList<Entry> expenses/incomes) | ||
* writes to the file in a similar format that is entered in to make a new Expense object within the constructor. | ||
* | ||
readExpenseFile() | ||
|
||
* This method reads in from the saved file either ExpenseData.txt or IncomeData.txt. Reads in and initialized each line as either expense or income. Then adds to the respective list. | ||
|
||
--- | ||
|
||
|Version| As a ... | I want to ... | So that I can ... | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User stories are repeated in the DG, there are 2 tables |
||
|--------|----------|-----------------------------------------------------------------------|--------------------------------------------------| | ||
|v1.0|user| add, delete, edit, and list my income | manage my income | | ||
|v1.0|user| add, delete, edit, and list my expenses | manage my expenses | | ||
|v1.0|user| set and view my budget | set expectation of how much money I should use | | ||
|v1.0|user| view how much of the budget I spend | manage and change my spending habit as necessary | | ||
|v1.0|user| view all comments that I can enter | get help on the features if necessary | | ||
|v2.0|user| list monthly expenses, income, and budget | refer to financial status in previous months | | ||
|v2.0|user| set the category of income and expenses, and list entries by category | refer to expenses and income by category | | ||
|
||
## Appendix: Requirements | ||
|
||
### Product scope | ||
|
||
**Target user profile**: | ||
|
||
- BrokeMan is suitable for students who have to work with tight budgets | ||
- students who want to use their money efficiently | ||
- students who want to minimize their spending. | ||
- students who can type fast | ||
- prefer typing to mouse interactions | ||
- is reasonably comfortable using CLI apps | ||
|
||
**Value proposition**: | ||
|
||
- Manage income and expenses faster than a typical mouse/GUI driven app | ||
- The program will offer visualization of the user's incomes, expenses and budget, allowing them to recap and be mindful | ||
about their financial status. The project will allow division of budget into multiple subcategories of expenses. In | ||
essence, the program sets students up for a better financial future. | ||
|
||
### User Stories | ||
|
||
Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*` | ||
|
||
| Priority | Version | As a ... | I want to ... | So that I can ... | | ||
|----------|---------|----------|-------------------------------------------|--------------------------------------------------| | ||
| `* * *` | v1.0 | user | add, delete, edit, and list my income | manage my income | | ||
| `* * *` | v1.0 | user | add, delete, edit, and list my expenses | manage my expenses | | ||
| `* * *` | v1.0 | user | set and view my budget | set expectation of how much money I should use | | ||
| `* * *` | v1.0 | user | view how much of the budget I spend | manage and change my spending habit as necessary | | ||
| `* * *` | v1.0 | user | view all command that I can enter | get help on the features if necessary | | ||
| `* * *` | v2.0 | user | list monthly expenses, income, and budget | refer to financial status in previous months | | ||
| `* * *` | v2.0 | user | save all my income and expenses entered | so that I can refer to it next time I return | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a second User Stories table that is almost similar to the first one above, is this supposed to be combined or meant to be an additional table? Can consider providing just 1 table to reduce confusion 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well done! I find that priority is a good feature of your user stories as it gives an idea of the most important features in your product |
||
|
||
*{more to be added}* | ||
|
||
### Use cases | ||
|
||
### Non-Functional Requirements | ||
|
||
{Give non-functional requirements} | ||
|
||
## Glossary | ||
|
||
* *glossary item* - Definition | ||
- **Mainstream OS**: Windows, Linux, Unix, OS-X | ||
- Command Line Interface (CLI) | ||
|
||
--- | ||
|
||
## Instructions for manual testing | ||
## Appendix: Instructions for manual testing | ||
|
||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can try to include how you give some input to the program and how the program should respond. For example: Input: abc Expected: Oops, I don't know what that means |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can add more diagrams of different types