-
Notifications
You must be signed in to change notification settings - Fork 140
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-W14-3] FinanceBuddy #25
Open
limkongkiat
wants to merge
947
commits into
nus-cs2113-AY2425S1:master
Choose a base branch
from
AY2425S1-CS2113-W14-3:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
947 commits
Select commit
Hold shift + click to select a range
6daeb24
Fix checkStyle
tsoudibi 8a948b1
Update DateParser
JuvenLimHY 17ce099
Edit UG
JuvenLimHY c6dd537
Add no / in description
JuvenLimHY a653485
Update date format dd/MM/yyyy
JuvenLimHY d95a584
Update year to yyyy
JuvenLimHY 008c5eb
Update PPP
JuvenLimHY 176886f
Merge pull request #280 from Littleme1032/Littleme1032-Juven-edit-ppp
JuvenLimHY 1e0f67d
Merge branch 'master' into Budget
ctzeyong 1f00a8c
Update budget prompting to user on startup
ctzeyong f27b49a
Add line breaks in Help sample output
limkongkiat 8315007
Merge pull request #275 from limkongkiat/update-UG-post-ped
limkongkiat dab656e
Update when balance recalculation is done
ctzeyong 9256451
Prevent budget amount from exceeding 9 999 999
ctzeyong 40ff2e3
Minor refactoring of method name to more appropriately suit what it does
ctzeyong 7ef1e6c
Update JUnit tests for added functionality
ctzeyong de52b72
Update JavaDoc for new methods and JUnit tests
ctzeyong 9380945
Merge pull request #277 from tsoudibi/add-storage-feedback
tsoudibi 6cab419
Update edit UG
tsoudibi 024bc80
Seperate SD into 2
tsoudibi 4c7e172
Merge branch 'master' into Littleme1032-juven-add-Date-Time-Feature
JuvenLimHY 92d8484
Edit test case
JuvenLimHY 08b3301
Merge pull request #276 from limkongkiat/bugfix-edit-out-of-position
limkongkiat 3083d81
Edit UG
JuvenLimHY 73fd350
Merge pull request #279 from Littleme1032/Littleme1032-juven-add-Date…
JuvenLimHY 3870f7d
Merge pull request #278 from Littleme1032/Littleme1032-Juven-edit-UG
JuvenLimHY 4aa407d
Change list command to show global index instead of relative index
limkongkiat f2a4d1b
Change displayed indexes and add total count for tests for `list`
limkongkiat f71dcab
Saves budget and balance amount as 2dp
ctzeyong d365f4c
Ensure budget and balance amounts are displayed the correct number of…
ctzeyong 91802e0
Update JUnit tests
ctzeyong 0fba07a
Update JavaDoc
ctzeyong 799f5a8
Minor checkstyle edit
ctzeyong f40d050
Merge branch 'master' into update-ug-dg
tsoudibi 16e782a
Merge pull request #282 from tsoudibi/update-ug-dg
tsoudibi 2168791
Update Javadoc comment for execute method of SeeAllEntriesCommand
limkongkiat 6c03b89
Add test for SeeAllEntriesCommand to check handling of null list
limkongkiat 57b5fa2
Extract repeated code in list command tests
limkongkiat aa9d5cd
Update test in Logic for handling list command
limkongkiat f9e8b47
Reduce magic strings in list command tests
limkongkiat 287c85f
Extract repeated code in SeeAllEntriesCommandTest into new method
limkongkiat ec98a1d
Reduce magic strings in SeeAllEntriesCommandTest
limkongkiat dc2189b
Add Javadoc comments for helper function in SeeAllExpensesCommandTest
limkongkiat 3474631
Add JUnit test for input parser
kestryix 5f187db
Add DeleteAll Feature
JuvenLimHY cc7e1f5
Edit checkstyle
JuvenLimHY 8d16e61
Merge pull request #283 from limkongkiat/edit-show-global-index
limkongkiat fab7358
Modify budget command to take in argument
kestryix 68ab5bd
Merge branch 'master' into app-budget
kestryix 584e8f1
Fix checkstyle
kestryix ab15a52
Fix checkstyle
kestryix 07fea91
Fix checkstyle
kestryix fe4909f
Fix checkstyle
kestryix 9f4779a
Merge pull request #281 from ctzeyong/Budget
limkongkiat b7f2082
Update sequence diagrams for List command
limkongkiat 1cfaf6f
Update examples for list command in UG
limkongkiat 2df8d3a
Update PPP for Lim Kong Kiat
limkongkiat 9846129
Merge branch 'master' into app-budget
kestryix a328691
Update description for list command in UG
limkongkiat f9a3e47
Fix checkstyle
kestryix bda2590
Fix checkstyle
kestryix c9158b9
Update boolean name
kestryix e1fca09
Merge pull request #285 from kestryix/app-budget
kestryix 61e5540
Add function to delete Files
tsoudibi ef9d710
Add check to limit financial list to 5000 entries maximum
limkongkiat 37b4801
Add test for AddExpenseCommand to test 5000-entry limit
limkongkiat 7320445
Add test for AddIncomeCommand to test 5000 entry limit
limkongkiat 1db2699
Add error signature to SeeAllExpensesCommandTest method
limkongkiat e95e3fd
Add test to ensure edit entry works with full list of 5000 entries
limkongkiat 437b04d
Fix junit
tsoudibi e0ee0da
Make minor edits to pass checkstyle
limkongkiat b4059fa
Merge pull request #288 from tsoudibi/add-delete-budget-storage
tsoudibi ec6585a
Update reposense link
kestryix 8e9cccd
Add back Storage files
limkongkiat 7cd6a7c
Merge pull request #287 from limkongkiat/update-UG-DG-list-entries
limkongkiat 1473a28
Update storage when budget deleted
kestryix c539957
Update output when no budget file
tsoudibi f3df457
Fix checkStyle
tsoudibi 51bc686
Fix typo
tsoudibi a735394
Fix junit
tsoudibi 72b713f
Merge pull request #291 from tsoudibi/fix-storage-output
tsoudibi 8aca254
Merge branch 'refs/heads/master' into app-budget
kestryix 66eb469
Update storage when budget deleted
kestryix 74c9aff
Update PPP
kestryix 7b05e5b
Merge pull request #293 from kestryix/verity-ppp
kestryix 76804b1
Add function to delete range
JuvenLimHY 1fa67d9
Merge pull request #289 from limkongkiat/limit-max-entries
limkongkiat 6d84e0e
Revert back indextoAmend
JuvenLimHY c4400d4
Merge branch 'master' into PPP
ctzeyong 721da01
Fix bug
kestryix d96f2ef
Merge pull request #284 from Littleme1032/Littleme1032-juven-DeleteAll
limkongkiat 50f14b3
Merge pull request #292 from kestryix/app-budget
kestryix 09a0325
Fix error message
kestryix 9ecea30
Update PPP
ctzeyong 650f345
Merge branch 'master' into Budget
ctzeyong c2709ea
Modify storage warning
tsoudibi 0c2e51d
Merge pull request #301 from tsoudibi/edit-storage-file-warning
tsoudibi fae164e
Fix checkstyle
kestryix 026d5f5
Fix testcase
kestryix 77f43b4
Merge pull request #302 from kestryix/app-budget
kestryix 99ec472
Update logic to prompt user to set budget
ctzeyong 615c7e5
Merge remote-tracking branch 'upstream/master' into Budget
ctzeyong b9c2ef9
Update logic on whether to print balance amount
ctzeyong 2bf749a
Update Help Command and corresponding test
limkongkiat 6b337bc
Update balance recalculation order when setting budget
ctzeyong 9ce4cc1
Edit budget command description in Help command
limkongkiat b5df063
Edit logic for prompting user to set budget to prevent null
ctzeyong 1fa397e
Update JavaDoc
ctzeyong bb92c84
Merge pull request #304 from ctzeyong/Budget
ctzeyong 242f249
Update msg
tsoudibi b5761af
Update Junit
tsoudibi e64da86
Merge pull request #305 from tsoudibi/update-storage-msg
tsoudibi 3ea215b
Add check to ensure that entry is not unchanged after edit command
limkongkiat eeeb222
Extract error message to Commons class
limkongkiat 4bf8f69
Change BUDGET to AMOUNT in Help message
limkongkiat cdb7dd2
update ppp
tsoudibi 37cb830
Merge pull request #303 from limkongkiat/update-help-command-111124
limkongkiat 982c47c
Merge pull request #307 from limkongkiat/edit-command-check-if-changed
limkongkiat 8e468fc
Update content
tsoudibi 9aab3a6
Merge pull request #308 from tsoudibi/tony-update-ppp
tsoudibi 8ce25c7
PPP update
ctzeyong e1d22db
Merge pull request #309 from ctzeyong/PPP
ctzeyong fe01a39
Update budget and command summary sections
kestryix 5295c69
Merge branch 'master' into UserGuide
ctzeyong c887edc
Update UG
ctzeyong 04a6cc0
Merge pull request #310 from kestryix/verity-ug
kestryix 3d49c1d
Merge pull request #311 from ctzeyong/UserGuide
ctzeyong 7bf0214
Update logic sequence diagram
kestryix b94d1d1
Fix bugs related to delete command
limkongkiat da02cc9
Fix checkstyle errors
limkongkiat 62bfce5
Update Storage UG and DG
tsoudibi 75fc784
Merge pull request #312 from limkongkiat/fix-delete-bugs
limkongkiat f3f09c5
Update DG
ctzeyong d04524c
Merge branch 'master' into DeveloperGuide
ctzeyong 7177983
Add more use cases in DG
tsoudibi 35cfbd4
Update comment of storage
tsoudibi 05d6787
Add another use case
tsoudibi d07a08f
Update ui, parser and logic sections based on current code
kestryix 1351928
Extract constants and rounding method into Commons class
limkongkiat ee3b684
Add Javadoc comments for Commons class
limkongkiat 94e3c89
Merge pull request #314 from kestryix/verity-dg
kestryix 3873622
Add duplicate argument detection to input parser
kestryix 50617b6
Merge pull request #315 from limkongkiat/update-commons
limkongkiat 982fe67
Merge branch 'master' into app-budget
kestryix b70c89e
Fix checkstyle
kestryix 4e239b3
Merge pull request #316 from kestryix/app-budget
kestryix cb402c7
Update PPP format
kestryix 083e1e5
DG update
ctzeyong b3bd236
Merge branch 'master' into Budget
ctzeyong 795766f
Merge pull request #317 from kestryix/verity-ppp
kestryix c1968e0
Update prompting when budget was set in a previous month
ctzeyong 65eb959
Update JUnit test
ctzeyong 17eb26f
Merge pull request #319 from ctzeyong/DeveloperGuide
ctzeyong 4013ba4
Merge pull request #318 from ctzeyong/Budget
ctzeyong 2ca1625
Update Edit UG
tsoudibi 68d3364
Update comtent
tsoudibi fc637f4
Fix typo
tsoudibi ee8701f
Add newlines
tsoudibi 55e15eb
Merge pull request #313 from tsoudibi/tony-update-ug-dg-v3
tsoudibi 258fff9
DG update
ctzeyong 80bfb78
Merge pull request #320 from ctzeyong/master
ctzeyong bb0d346
update typo
tsoudibi 2e97841
Merge branch 'master' into PPP
ctzeyong 279a37e
Merge pull request #321 from tsoudibi/tony-update-ug-again
tsoudibi 580d04e
Update PPP
ctzeyong 27c9f52
Update Command Summary of UG
limkongkiat 10b662b
Update List Entries section of UG
limkongkiat 757912f
Update Headers for Set/Edit Budget examples in UG
limkongkiat 6d9e4dd
Update Overview and Implementation Section of DG
limkongkiat 27118e6
Update User Stories and Product Scope
limkongkiat 18b0fb9
Add Future Enhancements Section to DG
limkongkiat c36f902
Add Future Enhancements to Table of Contents in DG
limkongkiat f4385e6
Fix typo in PPP
limkongkiat 40eab19
Update description in Overview section of DG
limkongkiat 9c55b44
Update Delete
JuvenLimHY c7c69d6
Merge pull request #322 from limkongkiat/update-UG-DG-PPP-kk
limkongkiat e842b95
Update DG
JuvenLimHY deaddde
Update UserGuide.md
JuvenLimHY 3883396
Merge branch 'master' into DeveloperGuide
ctzeyong 8f83bfa
DG update
ctzeyong 5b48acc
Update PPP
limkongkiat d3dac9a
Format User Guide sections
limkongkiat 87afc56
Update diagram in DG
limkongkiat 8ab16cf
Merge pull request #323 from Littleme1032/Littleme1032-juven-UG-DG
JuvenLimHY e7c6f83
Reorganize User Stories in DG
limkongkiat c475dce
UML sequence diagram update
ctzeyong 4b39693
Logging update for DG
ctzeyong 19130c9
Merge pull request #324 from ctzeyong/DeveloperGuide
ctzeyong 5f6b2ac
Merge branch 'master' into PPP
ctzeyong e90b7c0
Update PPP
limkongkiat f11bbfb
Update PPP
ctzeyong bdbaa54
Merge pull request #325 from ctzeyong/PPP
ctzeyong 63fc48f
Merge pull request #326 from limkongkiat/update-docs
limkongkiat f6202f5
Update Ui Parser Diagram
kestryix 0ee8283
Merge pull request #327 from kestryix/verity-dg
kestryix a24834c
Update PPP
kestryix 2d03f56
Merge pull request #328 from kestryix/verity-ppp
kestryix cead520
Removed duplicate
JuvenLimHY f60f4b1
Update UserGuide.md
JuvenLimHY b507a9e
changed all to dd/MM/yyyy
JuvenLimHY c73894a
Update example
JuvenLimHY 044282f
Update about us
kestryix d6674be
Merge pull request #330 from kestryix/verity-ppp
kestryix 2f126a0
Update PPP format
kestryix 5add58a
Merge branch 'master' into DeveloperGuide
ctzeyong 0bb1ad7
Merge pull request #331 from kestryix/verity-ppp
kestryix 7a59358
Change Finance Buddy to FinanceBuddy
ctzeyong cb16050
ADD last amended transaction to DU and fix UG typo
tsoudibi 13bfa96
Merge pull request #332 from tsoudibi/fix-ug-typo
tsoudibi 4c98ca0
Minor formatting fix
ctzeyong 97683b1
Cleaning up Notes
JuvenLimHY 8ae939e
Update line
JuvenLimHY df3f265
Edit DG
ctzeyong d860ea7
Merge pull request #333 from ctzeyong/DeveloperGuide
ctzeyong 7a551ed
Merge pull request #329 from Littleme1032/UG-duplicate
JuvenLimHY 10dfb29
Merge branch 'master' into PPP
ctzeyong e263015
Update PPP
ctzeyong 247a3da
Merge pull request #334 from ctzeyong/PPP
ctzeyong d07536d
Update DG
limkongkiat 808153d
Update PPP
ctzeyong 03e5102
Update DG
limkongkiat b7a4d05
Update Diagrams
limkongkiat 7f36391
Merge pull request #335 from ctzeyong/PPP
ctzeyong e6a58ff
Merge branch 'master' into DeveloperGuide
ctzeyong e47c51d
Update add transaction
JuvenLimHY e6eea66
Update DG UML
ctzeyong d5039a9
update
JuvenLimHY 6f18e97
Add Page Break to DG
limkongkiat 80b58bd
Merge pull request #337 from ctzeyong/DeveloperGuide
ctzeyong ea2e0d1
Remove extra colon in Contents Page
limkongkiat be2e13c
Merge pull request #338 from limkongkiat/update-DG-final
limkongkiat cb92e18
Merge pull request #336 from Littleme1032/UG-duplicate
limkongkiat 7cbd9eb
update
JuvenLimHY 9a57cfd
Merge pull request #339 from Littleme1032/UG-duplicate
JuvenLimHY 01135ba
Update UserGuide.md
JuvenLimHY 8dcc1b9
Merge pull request #340 from Littleme1032/UG-duplicate
JuvenLimHY 2166909
update
JuvenLimHY af61259
Merge pull request #341 from Littleme1032/Ug-update
JuvenLimHY acacb64
update
JuvenLimHY 3f92d65
Merge pull request #342 from Littleme1032/Ug-update
JuvenLimHY b383b4b
Update PPP
limkongkiat a65d50f
Merge branch 'master' into DeveloperGuide
ctzeyong a99f9ac
Merge pull request #343 from limkongkiat/final-update-ppp
limkongkiat 4f997a0
Fix broken links
ctzeyong 817ddfe
Merge pull request #344 from ctzeyong/DeveloperGuide
ctzeyong b7776fb
Merge branch 'master' into UserGuide
ctzeyong 52eaf5f
Minor bug fix
ctzeyong b3a1fb8
Merge pull request #345 from ctzeyong/UserGuide
ctzeyong a28d310
Update UG
limkongkiat 2af99fb
Merge pull request #346 from limkongkiat/last-update-ug
limkongkiat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,5 @@ checkstyle { | |
|
||
run{ | ||
standardInput = System.in | ||
enableAssertions = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | Juven Lim Heng Yi | [Github](https://github.com/Littleme1032) | [Portfolio](team/juvenlim.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Verity Lim | [Github](https://github.com/kestryix) | [Portfolio](team/kestryix.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Lim Kong Kiat | [Github](https://github.com/limkongkiat) | [Portfolio](team/limkongkiat.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Tsou Teng Yuan | [Github](https://github.com/tsoudibi) | [Portfolio](team/tengyuantsou.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Cheng Tze Yong | [Github](https://github.com/ctzeyong) | [Portfolio](team/ctzeyong.md) | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@startuml | ||
|
||
abstract class Command { | ||
{abstract}+execute() : void | ||
} | ||
|
||
class SeeAllEntriesCommand { | ||
} | ||
|
||
class SeeAllExpensesCommand { | ||
} | ||
|
||
class SeeAllIncomesCommand { | ||
} | ||
|
||
class AddExpenseCommand { | ||
} | ||
|
||
class AddIncomeCommand { | ||
} | ||
|
||
class DeleteCommand { | ||
} | ||
|
||
class EditEntryCommand { | ||
} | ||
|
||
class ExitCommand { | ||
} | ||
|
||
class HelpCommand { | ||
} | ||
|
||
Command <|-- SeeAllEntriesCommand | ||
SeeAllEntriesCommand <|-- SeeAllExpensesCommand | ||
SeeAllEntriesCommand <|-- SeeAllIncomesCommand | ||
Command <|-- AddExpenseCommand | ||
Command <|-- AddIncomeCommand | ||
Command <|-- DeleteCommand | ||
Command <|-- EditEntryCommand | ||
Command <|-- ExitCommand | ||
Command <|-- HelpCommand | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@startuml | ||
actor User | ||
participant "Logic" as L | ||
participant "DeleteCommand" as DC | ||
participant "FinancialList" as FL | ||
participant "BudgetLogic" as B | ||
participant "Storage" as ST | ||
|
||
User -> L: Enters "delete [INDEX] [/to ENDINDEX]" | ||
activate L | ||
|
||
alt Single Entry Deletion | ||
L -> DC: Create DeleteCommand for INDEX | ||
activate DC | ||
DC -> FL: Remove entry at INDEX | ||
deactivate DC | ||
opt If entry is an Expense | ||
L -> B: Update budget balance | ||
end | ||
else Range Deletion | ||
loop For each entry in range [INDEX, ENDINDEX] | ||
L -> FL: Remove entry at current index | ||
opt If entry is an Expense | ||
L -> B: Update budget balance | ||
end | ||
end | ||
else Delete Last Amended | ||
L -> FL: Remove last amended transaction | ||
opt If entry is an Expense | ||
L -> B: Update budget balance | ||
end | ||
else Delete All | ||
L -> FL: Clear all entries | ||
opt If expenses are cleared | ||
L -> B: Reset budget balance | ||
end | ||
end | ||
|
||
L -> ST: Update storage with FinancialList and BudgetLogic | ||
ST --> L: Acknowledge update completion | ||
|
||
L -> User: Display confirmation message | ||
deactivate L | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@startuml | ||
abstract class FinancialEntry { | ||
- double amount | ||
- LocalDate date | ||
- String description | ||
+ getAmount() : double | ||
+ getDescription() : String | ||
+ getDate() : LocalDate | ||
+ setAmount(double newAmount) | ||
+ setDescription(String newDescription) | ||
+ setDate(LocalDate newDate) | ||
} | ||
|
||
class Income { | ||
+ toString() : String | ||
+ toStorageString() : String | ||
} | ||
|
||
class Expense { | ||
+ toString() : String | ||
+ toStorageString() : String | ||
} | ||
|
||
FinancialEntry <|-- Income | ||
FinancialEntry <|-- Expense | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
@startuml | ||
skinparam sequenceMessageAlign center | ||
skinparam responseMessageBelowArrow true | ||
|
||
|
||
participant "FinancialList" as list | ||
participant "FinancialEntry" as entry | ||
participant "Income" as income | ||
participant "Expense" as expense | ||
|
||
== Add Entry == | ||
activate list | ||
list -> list : shouldDecrementIndex(entry, index) | ||
loop while shouldDecrementIndex == true | ||
list -> entry : getDate() | ||
list -> entry : getDate() for previous entry | ||
return date | ||
end | ||
list -> entry : add(insertIndex, entry) | ||
list -> list : updateCategoryTotal(entry) | ||
alt entry instanceof Income | ||
list -> income : instanceof? | ||
return isIncome | ||
list -> list : updateCategoryTotal(Income) | ||
else entry instanceof Expense | ||
list -> expense : instanceof? | ||
return isExpense | ||
list -> list : updateCategoryTotal(Expense) | ||
end | ||
deactivate list | ||
|
||
== Delete Entry == | ||
list -> list : deleteEntry(index) | ||
activate list | ||
list -> entry : remove(index) | ||
return | ||
deactivate list | ||
|
||
== Edit Entry == | ||
list -> list : getEntry(index) | ||
activate list | ||
list -> entry : setAmount(newAmount) | ||
deactivate list | ||
entry -> entry : setDescription(newDescription) | ||
entry -> entry : setDate(newDate) | ||
alt entry instanceof Income | ||
entry -> income : setCategory(newCategory as Income.Category) | ||
return | ||
else entry instanceof Expense | ||
entry -> expense : setCategory(newCategory as Expense.Category) | ||
return | ||
end | ||
|
||
== View Entry == | ||
list -> list : getEntry(index) | ||
activate list | ||
list -> entry : toString() | ||
deactivate list | ||
alt entry instanceof Income | ||
entry -> income : toString() | ||
return incomeString | ||
else entry instanceof Expense | ||
entry -> expense : toString() | ||
return expenseString | ||
end | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
@startuml | ||
abstract class FinancialEntry { | ||
- String description | ||
- double amount | ||
- LocalDate date | ||
{abstract} + getCategory() : Enum<> | ||
} | ||
|
||
class FinancialList { | ||
- ArrayList<FinancialEntry> entries | ||
- Map<Expense.Category, Double> totalExpenseByCategory | ||
- Map<Income.Category, Double> totalIncomeByCategory | ||
+ FinancialList() | ||
+ addEntry(FinancialEntry entry) : void | ||
+ deleteEntry(int index) : void | ||
+ editEntry(int index, double amount, String description, LocalDate date, Enum<?> category) : void | ||
+ getEntry(int index) : FinancialEntry | ||
+ getEntryCount() : int | ||
+ getTotalExpenseByCategory() : Map<Expense.Category, Double> | ||
+ getTotalIncomeByCategory() : Map<Income.Category, Double> | ||
+ getHighestExpenseCategory() : Map.Entry<Expense.Category, Double> | ||
+ getHighestIncomeCategory() : Map.Entry<Income.Category, Double> | ||
+ clearCategoryTotals() : void | ||
} | ||
|
||
class Income { | ||
- Category category | ||
+ Income(double amount, String description, LocalDate date, Category category) | ||
+ getCategory() : Income.Category | ||
} | ||
|
||
class Expense { | ||
- Category category | ||
+ Expense(double amount, String description, LocalDate date, Category category) | ||
+ getCategory() : Expense.Category | ||
} | ||
|
||
FinancialList "1" --> "*" FinancialEntry | ||
FinancialEntry <|-- Income | ||
FinancialEntry <|-- Expense | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@startuml | ||
actor User | ||
User -> Logic : editEntry(commandArguments) | ||
activate Logic | ||
|
||
Logic -> Logic : parseIndex(commandArguments.get("argument")) | ||
Logic -> FinancialList : getEntry(index - 1) | ||
activate FinancialList | ||
FinancialList --> Logic : FinancialEntry (entry) | ||
deactivate FinancialList | ||
|
||
Logic -> Logic : parseAmountOrDefault(commandArguments.get("/a"), entry.getAmount()) | ||
Logic -> Logic : parseDateOrDefault(commandArguments.get("/d"), entry.getDate()) | ||
|
||
alt entry is Expense | ||
Logic -> Logic : updateExpenseBalance(entry, amount, date) | ||
Logic -> BudgetLogic : changeBalanceFromExpense(entry.getAmount(), entry.getDate()) | ||
activate BudgetLogic | ||
BudgetLogic --> Logic : balance updated | ||
deactivate BudgetLogic | ||
Logic -> BudgetLogic : changeBalanceFromExpenseString(-amount, date) | ||
activate BudgetLogic | ||
BudgetLogic --> Logic : balance updated | ||
deactivate BudgetLogic | ||
end | ||
|
||
Logic -> Logic : getCategoryFromInput(commandArguments, entry) | ||
alt category specified | ||
Logic -> Logic : parseCategory(categoryStr, entry) | ||
end | ||
@enduml | ||
|
||
@startuml | ||
Logic -> EditEntryCommand ** : new EditEntryCommand(index, amount, description, date, category) | ||
|
||
ref over EditEntryCommand : Run command | ||
EditEntryCommand --> Logic : Command successfully executed | ||
|
||
|
||
Logic --> User : Entry edited successfully | ||
deactivate Logic | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@startuml | ||
skinparam sequenceMessageAlign center | ||
skinparam responseMessageBelowArrow true | ||
|
||
participant ":SeeAllEntriesCommand" as cmd | ||
participant "financialList:FinancialList" as list | ||
participant ":FinancialEntry" as entry | ||
|
||
|
||
|
||
|
||
cmd -> list : clear Category totals | ||
activate list | ||
return | ||
|
||
cmd -> list : getEntryCount() | ||
activate list | ||
return financialListEntryCount | ||
|
||
loop i < financialListEntryCount | ||
cmd -> list : getEntry(i) | ||
activate list | ||
return entry | ||
|
||
cmd -> cmd : shouldBeIncluded(entry) | ||
activate cmd | ||
return decision to include entry | ||
|
||
opt entry should be included | ||
cmd -> cmd : increment this.entryCount | ||
activate cmd | ||
return | ||
|
||
cmd -> entry : toString() | ||
activate entry | ||
return entryString | ||
cmd -> cmd : append to entryList | ||
activate cmd | ||
return | ||
|
||
cmd -> cmd : add/substract amount from net cashflow | ||
activate cmd | ||
return | ||
cmd -> list : update total expense/income in category | ||
activate list | ||
return | ||
end | ||
end | ||
|
||
alt this.entryCount == 0 | ||
cmd -> cmd : print no entry message | ||
activate cmd | ||
return | ||
else else | ||
cmd -> cmd: print entryList with net cashflow | ||
activate cmd | ||
return | ||
cmd -> list : getHighestExpenseCategory() | ||
activate list | ||
return highestExpenseCategory | ||
cmd -> list : getHighestIncomeCategory() | ||
activate list | ||
return highestIncomeCategory | ||
cmd --> cmd: print Highest Expense/Income category and amount spent/earned | ||
activate cmd | ||
return | ||
end | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There is no example of input and output screenshots for the explanation with the DG.