-
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-T13-2] Expense Tracker #79
base: master
Are you sure you want to change the base?
Changes from 250 commits
bf019eb
8002220
8dff7a9
13b4e36
918a82f
399dae5
72e6dc8
46c4548
89b1883
90ff69d
6f430b9
9407bed
394b4f3
79fabd4
9a2a727
6b46b64
241d168
f60e5bf
aec9774
0b7c8ea
68a75ae
431a3dc
56a07ad
7d140b6
465c0c3
5e90c54
7c87a13
a316eb2
ba1e430
7a17108
b69c4f1
9a258e4
4c2b21f
43825e4
950da9a
22c4094
61aade9
c8721a9
0e4e10f
1327359
b915b1a
6a2b580
eeddf19
054a3da
cb23227
4cb271e
df67b35
baea0a1
292ade6
452758c
e85dd16
421309c
af33514
49397a3
840d969
4ce20af
389a080
cd7ef6b
46c391a
aaa32f1
37cb9e3
56ae3e6
3b1ea1b
b19f8f4
1e15c81
79331eb
9adfe82
df0fa25
fff6da3
1d9ae06
7768f63
d5cb731
e92cae4
d8006cd
ea727a7
cd08acb
a4ba2ee
e62c9ad
f259203
403d524
c7e4d92
9b4e84a
c094248
9c6cec0
4af04c0
f0182ab
81f5983
5e14af6
8c28157
d00ecd6
5372a1a
4977c22
d65b8c4
e942beb
a5c71fe
0ec03d3
f63b7c7
660b010
2f9c832
9154892
427618b
bc44cc4
2605ffc
f872778
b7a081d
6b95ce0
ae399bb
6350971
52c2085
7ec5194
46c61f2
f4237ec
d62bcde
231b341
e3e3d98
b39eb66
2941a18
df8d37a
7761642
6f29d0c
8900a17
af45225
07a677f
1a1a519
0105c7b
cb66253
ca5f28c
2d2d74f
b9a3a05
136ca27
4d636e3
9ab6903
707b207
27ebdc1
8440b5d
86f0ec2
cc7ee58
90cf6db
059cf86
0f88ec9
b8aacbb
fc2c543
eb29e8e
8f4d26a
4244307
4c09678
a51d273
d166c1d
346c71c
537b31b
c664f22
93e63a3
0006c92
37f47e0
f69911b
e5d329c
9c32124
60ad15e
2ebc561
b32ed75
0d31649
c7958ef
e12d9a1
58e2196
eaf488c
ad94d2d
898b9ed
4a7efec
f02e2f7
f14e92a
26d2b56
08bb894
680d559
63be5d8
1d99b88
83446f2
186e34a
7401795
a74d891
c982e38
3b44470
f658a6e
8b6c3cb
30b40dd
087fcf9
ce20651
df3ebaa
89dbcc6
6609863
676964e
50d3282
2243507
3880441
aeace56
e0dc50c
a11063c
240aa32
bced6d4
190026c
f04e272
3401588
4501d8f
e6fa1e5
aa5a15a
f8491b3
7714e6a
a7a49cf
76e7382
49e6f65
b2c6ecb
06ca2f4
362d65e
ac89c31
2970671
939d8c9
84c488f
ea1d747
e33531f
0db0122
9d9eaf7
02b3ad0
6331618
ecbbcaa
e6ba57b
6b276c1
0b7c0c4
53b633b
9ae5fe2
acfb6bb
e8438ad
f10fee7
483a9f8
962c566
40cb849
39b2b4e
3480bc0
f35bf6c
c8f14f1
b8bcd99
ac50f7a
97b212f
1d375b9
d3b79ed
dae27f2
ff796b1
07be2dc
5a648af
4494fe2
3fbd41a
0bdb9ba
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# Contributors | ||
|
||
Display | Name | Github Profile | Homepage | ||
---|:---:|:---:|:---: | ||
![](https://avatars0.githubusercontent.com/u/22460123?s=100) | Jeffry Lum | [Github](https://github.com/j-lum/) | [Homepage](https://se.kasugano.moe) | ||
![](https://avatars0.githubusercontent.com/u/1673303?s=100) | Damith C. Rajapakse | [Github](https://github.com/damithc/) | [Homepage](https://www.comp.nus.edu.sg/~damithch/) | ||
| Display | Name | Github Profile | Homepage | | ||
|------------------------------------------------------------|:-------------------:|:-------------------------------------:|:--------------------------------------------------:| | ||
| ![](https://media.licdn.com/dms/image/C5603AQECXBzH5HvYew/profile-displayphoto-shrink_800_800/0/1654775943351?e=1683763200&v=beta&t=2H6AN8qbcm5b9uCpDSRhNNOm2qgv4mn21XY2f1QisEM)) | Bui Phuong Nam | [Github](https://github.com/j-lum/) | [Homepage](https://github.com/arsdorintbp2003) | | ||
| ![](https://avatars0.githubusercontent.com/u/1673303?s=100) | Damith C. Rajapakse | [Github](https://github.com/damithc/) | [Homepage](https://www.comp.nus.edu.sg/~damithch/) | | ||
|
||
# I would like to join this list. How can I help the project | ||
|
||
For more information, please refer to our [contributor's guide](https://oss-generic.github.io/process/). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: seedu.duke.Duke | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# 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) | FanZixian | [Github](https://github.com/FanZixian) | [Portfolio](docs/team/fanzixian.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | GohJinWeiAaron | [Github](https://github.com/GohJW) | [Portfolio](docs/team/gohjinweiaaron.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Zhang Zhitong | [Github](https://github.com/Zhang-Zhitong) | [Portfolio](docs/team/zhangzhitong.md) | | ||
| | Ju Can | [Github](https://github.com/ju-can) | | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Bui Phuong Nam | [Github](https://github.com/arsdorintbp2003) | [Porfolio](docs/team/BuiPhuongNam.md) | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,87 @@ | |
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
* [JSON-java](https://github.com/stleary/JSON-java) | ||
* [three-ten-extra](https://www.threeten.org/threeten-extra/) | ||
* * Requesting and Parsing of data from API into Java | ||
* https://www.youtube.com/watch?v=lDEfoSwyYFg | ||
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 believe it would be beneficial if this link was a hyperlink, making it easier for readers to click on it. |
||
## Design & implementation | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
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. Perhaps this should be replaced with something along the lines of "This section describes the design and implementation of the product, with UML diagrams and code snippets where applicable." instead. |
||
## Design | ||
![](diagrams/Overall.png) | ||
Our main `Duke` class is responsible for the instantiation and launch of our application. | ||
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 is a formatting issue at this line. I think a double space is missing on line 14 to make it a new paragraph 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. Hmm, I see that your product is called Expense Tracker but the Main Class for this product is called Duke. Perhaps it would be better to rename the Class to fit the product? So that I as a developer won't be confused as to why the class is named Duke. |
||
Our overall project design is split into 5 components, `command`, `common`,`data`, `storage` and `parser`. | ||
- `command`: The command executor. | ||
- `data`: Holds data and data structures of our application. | ||
- `parser`: Reads data from the user input and parses it into an 'executable' command. | ||
- `common`: Holds mainly static data that is used by multiple components. | ||
- `storage`: Handles the reading and storing of our data. | ||
|
||
## Implementation | ||
### 'Add' feature | ||
This mechanism is facilitated by `CommandAdd`, which extends `Command`, as well as `ParserAdd`. `ParserAdd` parses the | ||
user input into a string of words `parsedInput[]` which `CommandAdd` then stores internally. `CommandAdd` also stores an | ||
internal reference to the list of expenses `expenseList` to be added to. | ||
|
||
`CommandAdd` implements the following operations: | ||
- `CommandAdd#execute()` -- Instantiates the `Expense` object with the parsed inputs and adds it to `expenseList` | ||
- `CommandAdd#roundInput(amount)` -- Rounds the expense amount to 2 decimal places. | ||
|
||
`ParserAdd` implements the following operations: | ||
- `ParserAdd#parseInput(userInput)` -- Parses the user input into an array of strings for `CommandAdd` to read. | ||
- `ParserAdd#checkType(input)` -- Checks the type of the input corresponding to its index. | ||
- `ParserAdd#substringIndex(type)` -- Returns the substring index of the start of the user input. | ||
|
||
The `CommandAdd#execute()` operation is exposed in the main `Duke` class, while the operations in `ParserAdd` are | ||
exposed in the `Parser` class. | ||
|
||
Given below is an example usage of the feature. | ||
![](./diagrams/AddFeature.png) | ||
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. Consider describing a little bit about what's going on in the functions called, like use refs or something. 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. Perhaps it would be nice to standardize the fonts in the diagrams, as the words in some diagrams are bolded and the words in others are not bolded |
||
|
||
Step 1. The user executes `add amt/24 t/02-02-2012` as the `userInput` to add a new `Expense` into the the list of | ||
expenses. `Duke` calls `Parser#extractCommandKeyword(userInput)` to parse the input and determines that the `add` command is called. | ||
|
||
Step 2. `Duke` instantiates a new `CommandAdd` and calls `CommandAdd#execute()`, which in turn calls | ||
`Parser#extractAddParameters(userInput)` and `ExpenseList#getExpenseList()`. | ||
|
||
Step 3. `Parser#extractAddParameters(userInput)` then calls `ParserAdd#parseInput(userInput)` and returns the parsed | ||
input as a string of words `parsedInput[]`. | ||
|
||
Step 4. `CommandAdd#execute` instantiates a new `Expense` object with the returned `parsedInput[]` and adds it to | ||
`expenseList`. | ||
|
||
## Product scope | ||
### Target user profile | ||
|
||
{Describe the target user profile} | ||
- People who want to keep track of their expenses easily | ||
- Users who travel overseas often and want to keep track of their expenses throughout their travels | ||
|
||
### Value proposition | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
- Our expense tracker is a simple program that allows users to track their expenses | ||
- With simple commands and ease of use, users are able to use our tracker with little to no experience. | ||
|
||
## User Stories | ||
|
||
|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| | ||
| Version | As a ... | I want to ... | So that I can ... | | ||
|---------|------|----------------------------------------|------------------------------------------------------------------| | ||
| v1.0 | new user | add a new entry for my expenses | - | | ||
| v1.0 | user | delete entries | - | | ||
| v1.0 | user | add expenses with dates | track how much I spend each day | | ||
| v1.0 | user | add expenses of different categories | keep track of what I spend on | | ||
| v1.0 | user | see all my past expenses | plan my budget accordingly | | ||
| v2.0 | user | add expenses with specified currencies | know the exact amount I spent in different currencies | | ||
| v2.0 | user | sort my expenses by category/date | better keep track of my expenses through either date or category | | ||
| v2.0 | user | - | - | | ||
| v2.0 | user | - | - | | ||
|
||
|
||
## Non-Functional Requirements | ||
|
||
{Give non-functional requirements} | ||
* Expense tracker should function with or without an internet connection. | ||
* Expense tracker should work even on days where the forex market is closed | ||
|
||
## Glossary | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
|
||
box 'Add' | ||
participant ":Duke" as Duke | ||
participant "parser:Parser" as Parser | ||
participant "parserAdd:ParserAdd" as ParserAdd | ||
participant "expenseList:ExpenseList" as ExpenseList | ||
participant ":CommandAdd" as CommandAdd | ||
-> Duke: input | ||
Activate Duke | ||
Duke -> Parser: extractCommandKeyword(input) | ||
Activate Parser | ||
Parser --> Duke | ||
Deactivate Parser | ||
Duke -> CommandAdd**: | ||
Activate CommandAdd | ||
CommandAdd --> Duke | ||
Deactivate CommandAdd | ||
Duke -> CommandAdd: execute() | ||
Activate CommandAdd | ||
CommandAdd -> Parser: extractAddParameters(input) | ||
Activate Parser | ||
Parser -> ParserAdd: parseInput(input) | ||
Activate ParserAdd | ||
ParserAdd --> Parser: parsedInput | ||
Deactivate ParserAdd | ||
Parser --> CommandAdd: parsedInput | ||
Deactivate Parser | ||
CommandAdd -> ExpenseList: getExpenseList() | ||
Activate ExpenseList | ||
ExpenseList --> CommandAdd: expenseList | ||
Deactivate ExpenseList | ||
CommandAdd -> ExpenseList: add(Expense) | ||
Activate ExpenseList | ||
ExpenseList --> CommandAdd | ||
Deactivate ExpenseList | ||
CommandAdd --> Duke | ||
Deactivate CommandAdd | ||
Destroy CommandAdd | ||
@enduml |
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.
Appears to be a duplicated bullet point in this line, possible formatting error?