-
Notifications
You must be signed in to change notification settings - Fork 247
[CS2113-T12-1] ChChing #24
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
base: master
Are you sure you want to change the base?
Changes from 250 commits
dcb4782
1d11193
19463ab
374c338
d9fd8b6
c75b55c
043bacb
5d24da3
a490ab2
229e7ea
41430eb
278ee15
a69bd64
807011c
1bdcc06
2d7cf57
a5f3f61
ffbadfc
3194565
62f96e8
337c218
97aa3e9
7a6a9df
3995445
8ad9421
be71999
4e47039
7c0f362
0643ca8
8b6d615
2ae1920
c8e1608
6eea5ac
0b5a5e2
2c46964
0252ddc
f8afa12
4df23ca
6df614c
f5e47fd
3dab7d7
31ba357
870042c
21b511b
07e9184
baa9878
1c2c26e
23f4f70
8038fbd
2148511
890f1d4
186e4dd
d9a1766
b69862d
3f686ba
7fa2846
6a16141
bfb540b
81a644a
aa03a2e
6841724
68d1b89
9871d67
c43052a
9a879a8
cbfe03f
b589961
1e8803f
bf7d53a
aaf17f7
d78eb97
c34ff7f
3138901
8ed22f4
734c959
c5f040b
555e3a5
58a53a9
546a558
5c7a493
c87a0b8
c45d8fc
1be4de0
02e8202
a4db33b
9ef044a
9bfc380
4e3d22b
93ac636
1905492
af41b9c
4a09c0c
85d8aa5
48740ee
8b37b29
3cdc360
6627f7b
7e9a254
5878b76
1bd69ca
841ab21
4361b80
9abc2e3
025664d
caeda1a
ab2656a
6b676a1
8fd54af
b920b3e
5851e3c
4c28f43
2b2b4e3
906baf4
2335c24
2e283c2
9c81979
436ed27
9f524a6
08dac9c
c9b0b46
f38ccf8
9339530
bb8732f
8bef800
7c5c0e3
6c90a3a
678bc49
e3bb99f
47bdd6b
a0344ee
e6f67a9
c011ef2
acd4b93
806850b
c6602be
932c8e9
a3337f8
c91ce5d
b198288
284d5c9
8a12c95
249b4c9
33ba5ff
32b3f76
3e8a856
0ce69e4
251aa20
58b473f
6ea16e3
fefccce
b33e907
2cc5be3
35c78f2
5fd7603
da66747
47dba67
b30b8b8
5f205cb
a1d7644
9037597
c98caf4
2220dfa
06f6215
d7e06f7
60be507
76291ec
d37c124
0d2e9b9
8bf6aad
04fe517
c4139d1
2dcf733
cc6ed32
8d955fc
af9bd49
5648fdd
df19650
a245914
86ef4f1
56928ff
556a7e8
556b6f1
dbf773c
eda4f34
7073049
27915e5
bb098f0
8a84fd6
ce9f87c
c2a4fe2
38c3884
1cd7fb6
44e73d3
d3fb143
3dfe165
abcbe2e
b0d7f79
21bbaa2
5e44c8e
564ed3b
a1a7f1c
ce318eb
11795bb
f5f541c
b9658ac
9ab50b8
a0cf613
dbf74e6
96b0a98
513b1b3
322fb72
db837b3
9af3a1b
3848e69
7af572a
effb913
df64151
b566e25
50afacd
77e1e1e
6653161
becaf14
bd29a9d
a45f934
8a85e6f
e4934ab
731e284
a2bb66f
454fd85
fc82d36
8f60c92
6dbf53d
5712364
adbb21c
282d212
675940d
8189eb7
4dcbffc
867ce7d
ff7fd69
8fc5f98
245ce5f
2c74f57
2e87b84
d95cbce
d6cb099
b306858
eff65ea
178f081
0f3e90b
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 |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ bin/ | |
|
|
||
| /text-ui-test/ACTUAL.TXT | ||
| text-ui-test/EXPECTED-UNIX.TXT | ||
| /data | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| I | tuition | 2023-12-12 | 500.00 | ||
| I | test | 2022-11-11 | 300.00 | ||
| I | test | 2023-12-12 | 500.00 | ||
| E | expense | transport | 2023-12-12 | 500.00 | ||
| E | tuition | test | 2023-12-24 | 350.50 | ||
| E | test | test | 2023-07-05 | 300.00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # About us | ||
|
|
||
| Display | Name | Github Profile | Portfolio | ||
| --------|:----:|:--------------:|:---------: | ||
|  | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
|  | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
|  | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
|  | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
|  | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
| Display | Name | Github Profile | Portfolio | ||
| --------|:----------------------:|:-------------------------------------------:|:---------: | ||
|  | Nafis Azizi Riza | [Github](https://github.com/nafisazizir) | [Portfolio](team/nafisazizir.md) | ||
|  | Eng Chen Xi, Aviel | [Github](https://github.com/avielcx) | [Portfolio](team/aviel.md) | ||
|  | Pang Yan Ming | [Github](https://github.com/Rayleigh47/) | [Portfolio](team/yanming.md) | ||
|  | Thomas Joseph Lee Alba | [Github](https://github.com/thomasjlalba) | [Portfolio](team/thomas.md) | ||
|  | Hung Hin Wang Clement | [Github](https://github.com/hyperbola-bear) | [Portfolio](team/clement.md) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,23 +8,119 @@ | |
|
|
||
| {Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
|
||
| ## Implementation | ||
|
|
||
| ### Record and RecordList | ||
|
|
||
| The main class in our program is the ```Record``` and ```RecordList``` abstract classes, in which ```Income```, ```Expense``` will inherit from ```Record``` and ```IncomeList``` and ```ExpenseList``` will inherit from ```RecordList```. Most commands will act on instances of the ```Income```, ```Expense```,```IncomeList``` and ```ExpenseList``` 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 notation for abstract class for Record and RecordList is wrong. It should be {Abstract} rather than << Abstract >>. Overall, a good detailed class diagram provided |
||
|  | ||
|
|
||
|
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. For this UML diagram:
|
||
| ### DeleteIncomeCommand | ||
|
|
||
| The proposed DeleteIncomeCommand mechanism is facilitated by ```System```, ```Incomes```, ```UI``` and ```ChChingException```. | ||
| The command receives the instruction from ```UI``` and will call the ```execute``` method. | ||
| If ```index <= 0```, the command will throw a new ChChingException and print ```"Zero/Negative index"```. | ||
|
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. Should the arrow for this part of the sequence diagram ChChingException("Zero/Negative index") be further improved? |
||
| If ```index > incomes.size()```, the command will also throw a new ChChingException and print ```"The number is too big"``` | ||
| Entering any of these optional lines will result in early termination of the command. | ||
| Or else, the command will continue to delete the entry at the particular index. | ||
| Afterwards, the ```execute()``` method will print ```"Income deleted, here is the updated list:"``` and prints the entries in the income list. | ||
|
|
||
|  | ||
|
|
||
| ### Target and TargetStorage | ||
|
|
||
| The `Target` and `TargetStorage` class allows users to set a target for their ideal balance. | ||
|
|
||
|
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. Good use of protected variables as seen from the # notation. |
||
|  | ||
|
|
||
| ### [Proposed] EditIncomeCommand/EditExpenseCommand | ||
| The proposed edit income command is facilitated by `Parser`, `EditIncomeCommand`, `IncomeList`, while the proposed edit expense command is facilitated by `Parser`, `EditExpenseCommand` and `ExpenseList`. | ||
|
|
||
| Note that below highlights the implementation of the edit income command, with edit expense command following the same implementation. | ||
|
|
||
| Given below is how the edit income mechanism works at each step: | ||
| 1. The user types in the command for edit income with the necessary arguments given to indicate which income record to edit and what fields to edit for the chosen income record. | ||
| 2. The line inputted by the user will then be parsed by `Parser`, where it will check if the input contains a valid index with valid fields to edit. If they are valid, it will return `EditIncomeCommand`. Else it will throw a `ChChingException` indicating an error in the input from the user. | ||
| 3. `EditIncomeCommand` will then perform its `execute` method, where for each field to be edited, it will call `editIncome` method from the `ExpenseList` class. This would then update the required income record accordingly. | ||
|
|
||
| The following sequence diagram shows how the edit income command works: | ||
| <br>  | ||
|
|
||
| The edit expense command works in a similar way, with its sequence diagram as shown: | ||
| <br>  | ||
|
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 edit expense sequence diagram may not be necessary due to its similarity to the edit income sequence diagram shown above. On the other hand, this font is clearer and more comprehensive to read as compared to the above sequence diagrams. |
||
|
|
||
| The following activity diagram summarises what happens when a user executes edit income command: | ||
| <br>  | ||
| <br> Note that edit expense command produces the same activity diagram. | ||
|
|
||
| **Design Considerations** | ||
| <br>The following are the design alternatives we considered for edit income/expense command: | ||
|
|
||
| * **Alternative 1 (current choice):** Edit only the specific fields indicated in the input arguments. | ||
| * Pros: Easier for the user to input an edit. | ||
| * Cons: May introduce more bugs. | ||
| * **Alternative 2:** Edit to require user to rewrite all its fields. | ||
| * Pros: Easier to implement. | ||
| * Cons: Not any easier than having the user to just delete and add new expense/income. | ||
|
|
||
|
Comment on lines
+53
to
+111
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 really like how you implement and included this activity diagram as part of the Developer's Guide to give a clearer view of what is happening when the user executes the edit income command. The activity diagram is also accurate and neat. Well Done! |
||
| ### ListExpenseCommand | ||
| The listExpenseCommand is facilitated by ```Parser```, ```ListExpenseCommand``` and ```ExpenseList```. | ||
|
|
||
| 1. The user inputs the command top list expense. This input is handled by```Parser``` which returns the | ||
| ```listExpenseCommand``` if successful. | ||
| 2. ```ListExpenseCommand``` will then call its ```execute``` method | ||
| which makes use of ```System``` to print a new line ```"Expenses:"```. | ||
| 3. The ```expenseList``` method ```printExpenseList``` | ||
| is called, which iterates through the expenseList, ```expenses``` and prints the index as well as a completed string of | ||
| expenses in ```expenses```. | ||
|
|
||
|  | ||
|
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. For this diagram:
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 execute portion of the class diagram is also incorrect. It should be something like execute( ... ): void. |
||
| ### SetTargetCommand | ||
| The setTargetCommand is facilitated by ```ChChing```, ```Parser```, ```TargetParser```, ```TargetStorage```. | ||
| When the command receives to set target, the ```parse()``` method of the ```Parser``` object will read in the command and call the ```parseTarget()``` method from the TargetParser class | ||
| to instantiate a Target object and initializes a target value. Afterwards, ```parse()``` method calls the ```AddTargetCommand``` and instantiate a ```SetTargetCommand``` object and returns to the ```Parser``` object. | ||
| The ```Parser``` object then returns to ```ChChing```. ```ChChing``` object then runs the ```execute()``` method of the SetTargetCommand object. The method then calls the ```setTarget()``` method of the ```TargetStorage``` object to store the previously initialized ```Target``` object. | ||
|
|
||
|  | ||
| ### SetCurrencyCommand | ||
| The setCurrencyCommand is facilitated by ```System```, ```Selector```, ```UI``` and ```ExpenseList```. | ||
| The command receives the instruction from ```UI``` and will call the ```execute``` method. | ||
| The ```execute()``` method in setCurrencyCommand will then call the ```containsCurrency(currency)``` method from ```Selector```. | ||
| If the method returns false, which indicates that the currency is not available, the command will throw a new ChChingException and print ```"Currency not available"```. | ||
| If the method returns true, the command will continue to set the currency in the selector hashmap to true. | ||
| Afterwards, the ```execute()``` method will call the ```printSelector()``` method from ```Selector```. | ||
| The ```printSelector()``` method will print all the available currencies in the selector hashmap. | ||
| The selected currencies will be marked with a ```[X]``` and the unselected currencies will be marked with a ```[ ]```. | ||
|
|
||
|
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. Formatting in the DG is a little bit inconsistent. While ListExpenseCommand and EditIncomeCommand uses numbering to sequence the explanation, the other Commands are explained in one large chunk. It may be better to standardize the way of explaining. |
||
|  | ||
|
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. To add on to the above, the formating of the sequence diagrams themselves are slightly inconsistent, in terms of the colour of the boxes of the instances, and the word font colour of the operations. |
||
|
|
||
| ## Product scope | ||
|
|
||
| ### Target user profile | ||
|
|
||
| {Describe the target user profile} | ||
| Target users are people who are keen on improving their financial accountability | ||
|
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. Could this be elaborated on further? For example, what exactly is financial accountability? 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. To add on the above. Perhaps a brief description of how this product is able to help people to improve their financial accountability can be briefly stated? |
||
|
|
||
| ### Value proposition | ||
|
|
||
| {Describe the value proposition: what problem does it solve?} | ||
| The value proposition of ChChing is its ability to track income and expenses on a daily basis. | ||
|
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. Could this be elaborated on further? How else does this application solve the problem better than other similar applications? |
||
|
|
||
| ## 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 | see usage instructions | refer to them when I forget how to use the application | | ||
| | v1.0 | user | add new expense to the records | record all my expenses | | ||
| | v1.0 | user | add new income to the records | record all my incomes | | ||
| | v1.0 | user | view all the records | refer to them when I forgot my expenses and incomes | | ||
| | v1.0 | user | edit the records | modify/fix if the records is changed/wrong | | ||
| | v1.0 | user | know current balance | aware how much money do I have left | | ||
| | v2.0 | user | edit my existing entries | rectify or update any entries without having to enter another entry and delete an entry | | ||
| | v2.0 | user | find specific entries | refer to specific entries when necessary | | ||
| | v2.0 | foreigner | view my entries in a different currency | read my incomes and expenses in a currency I am familiar with | | ||
| | v2.0 | user | set a target for my balance | improve my financial management | | ||
| | v2.0 | user | see the target i have set | remind myself of my target | | ||
| | v2.0 | user | reset my income/expense lists or both | have a fresh list | | ||
|
Comment on lines
+209
to
+222
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. Great user stories!! Your application accurately solves the problems listed.
Comment on lines
+209
to
+222
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 like how you implement the user stories in this format, and user stories are clear and specific. |
||
| ## Non-Functional Requirements | ||
|
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. Please add these details in the next iteration in your DG 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. Eg. Add sample test cases for commands |
||
|
|
||
| {Give non-functional requirements} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #Build Settings | ||
|
|
||
| theme: minima | ||
| markdown: GFM |
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.
You could add the system architecture diagram in the next iteration of this DG to depict the high-level design of your software and make it more detailed.