Skip to content
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-T18-2] FinancialPlanner #17

Open
wants to merge 711 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 222 commits
Commits
Show all changes
711 commits
Select commit Hold shift + click to select a range
b5ba1de
Change method name for clarity
Oct 31, 2023
e7355e4
Update DG with recur feature
Oct 31, 2023
bedd062
Add recur class and sequence diagrams
Oct 31, 2023
9442c88
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Oct 31, 2023
7edf450
Merge branch 'master' into Branch-UpdateDG
Oct 31, 2023
4257110
Solve suggestions of Minwei
hshiah Oct 31, 2023
0aa5efa
Update DG content page
Oct 31, 2023
8ef4691
Update UG explaining the meaning of cashflow
Oct 31, 2023
425cf72
Solve minor errors.
hshiah Oct 31, 2023
1642706
Merge pull request #134 from hshiah/hshiah
hshiah Oct 31, 2023
6ac95c6
Add some fix to DG and UG
wwweert123 Nov 1, 2023
59beb3d
Merge branch 'master' into VisDG
wwweert123 Nov 1, 2023
f2077fc
Update DG
Nov 1, 2023
53cc8ca
Fix typo to be in camelCase
Nov 1, 2023
be61c28
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 1, 2023
8e6bc95
Merge branch 'master' into Branch-UpdateDG
Nov 1, 2023
35f10a3
Merge pull request #135 from NeoMinWei/Branch-UpdateDG
NeoMinWei Nov 1, 2023
660f302
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 1, 2023
c9b08fc
FIx formatting error in UG
Nov 1, 2023
3813917
Merge pull request #140 from NeoMinWei/Branch-UGquickfix
NeoMinWei Nov 1, 2023
5d2940d
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 1, 2023
d90ccc5
Finish all user stories for v2.0
hshiah Nov 1, 2023
2ecb578
Add help command
YFshadaow Nov 1, 2023
3f80f21
Update EXPECTED.TXT for UI testing
YFshadaow Nov 1, 2023
27418e4
Update src/main/java/seedu/financialplanner/commands/MarkGoalCommand.…
hshiah Nov 1, 2023
410558c
Update src/main/java/seedu/financialplanner/commands/MarkGoalCommand.…
hshiah Nov 1, 2023
d9293b5
Update ExpenseType.java
hshiah Nov 1, 2023
01e764d
Update MarkGoalCommand.java
hshiah Nov 1, 2023
a026d6c
Update src/main/java/seedu/financialplanner/commands/DeleteGoalComman…
hshiah Nov 1, 2023
0544e3f
Merge pull request #143 from hshiah/temp
hshiah Nov 1, 2023
62ab3bf
Merge pull request #141 from wwweert123/VisDG
wwweert123 Nov 1, 2023
ac5f45a
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp …
YFshadaow Nov 1, 2023
3eab7c3
Resolve merge conflicts
YFshadaow Nov 1, 2023
c8298c3
Merge pull request #142 from YFshadaow/help-command
YFshadaow Nov 1, 2023
810c718
Fix DG sequence diagram for cat and vis
wwweert123 Nov 2, 2023
4392054
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 2, 2023
3590c87
Update UG. Fix some minor errors of reminder and goal. Update the sav…
hshiah Nov 2, 2023
2447cba
Fix code according to DG
wwweert123 Nov 2, 2023
47187ce
Update WishList.java
hshiah Nov 3, 2023
e249eca
Update ReminderList.java
hshiah Nov 3, 2023
3f4327a
Merge pull request #151 from hshiah/hshiah
hshiah Nov 3, 2023
d95af1b
Merge branch 'master' into VisDG
wwweert123 Nov 3, 2023
ad69fe0
Merge pull request #150 from wwweert123/VisDG
wwweert123 Nov 3, 2023
2815bb5
Remove long method parameters in recur sequence and class diagrams
Nov 4, 2023
03c556b
Resolve spacing issues in headers
Nov 4, 2023
9abcc2f
Add description for the types accepted in add income and expense
Nov 4, 2023
c27e5dd
Fix bugs
ryan1604 Nov 4, 2023
26bbcd4
Add maximum/minimum value exception
Nov 4, 2023
fd935ef
Add trimming of arguments from input
Nov 4, 2023
b75a589
Add listing of total balance in list command and removing of extra sp…
Nov 4, 2023
6611146
Update diagrams, DG and UG
ryan1604 Nov 4, 2023
51480db
Add change for loading watchlist with more than 5 stocks, initallize …
wwweert123 Nov 4, 2023
ed086fe
Merge branch 'master' into FixBugsEnhanceDGUG
wwweert123 Nov 4, 2023
e0869ff
Update UG
ryan1604 Nov 4, 2023
1c50478
Update test file
ryan1604 Nov 4, 2023
0a1278b
Create new constructor for adding base stocks
wwweert123 Nov 4, 2023
9430c21
Update reset budget diagram
ryan1604 Nov 4, 2023
8ea9b49
Fix typo
ryan1604 Nov 4, 2023
2902393
Add mechanism to clean up watchlist as much as possible to remove non…
wwweert123 Nov 4, 2023
f008034
Add to UG to warn user
wwweert123 Nov 4, 2023
1f63e8d
Add check for whether null stocks are passed before printing
wwweert123 Nov 4, 2023
466e04d
Add saving of watchlist after watchlist command
wwweert123 Nov 4, 2023
8b56635
Add attempt of removing of both normal stock and its uppercase form
wwweert123 Nov 4, 2023
4270383
Add details to UG
wwweert123 Nov 4, 2023
6edb7ea
Add printing of acknowledgement to APIs
wwweert123 Nov 4, 2023
0146afb
Add PPP to be completed
ryan1604 Nov 4, 2023
d7e4477
Add instructions for adding stock using JSON
wwweert123 Nov 4, 2023
c1af3ef
Add additonal checks for adding stock and handle exception for stock …
wwweert123 Nov 4, 2023
52300e6
Add to UG q and A
wwweert123 Nov 4, 2023
1bafe66
Fix bug
Nov 4, 2023
98daeac
Fix checkstyle
wwweert123 Nov 4, 2023
11d1174
Fix code according to reviewer
wwweert123 Nov 4, 2023
8d7db09
Fix typo
wwweert123 Nov 5, 2023
f9593b3
Add return in Budget
ryan1604 Nov 5, 2023
6073833
Merge pull request #191 from ryan1604/branch-bugfix
ryan1604 Nov 5, 2023
e6cc5c4
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 5, 2023
a8d8d26
Merge branch 'master' into Branch-PEBugFix
Nov 5, 2023
058defc
Make changes according to PR reviews
Nov 5, 2023
07b02e6
Add trimming for commands
wwweert123 Nov 5, 2023
265b96c
Add padding to watchlist command
wwweert123 Nov 5, 2023
4927653
Add on to UG
wwweert123 Nov 5, 2023
12a0724
Add PPP
wwweert123 Nov 5, 2023
5865c8e
Merge branch 'master' into FixBugsEnhanceDGUG
wwweert123 Nov 5, 2023
f988a32
Change colour of message printed
wwweert123 Nov 5, 2023
51f8f51
Merge pull request #193 from wwweert123/FixBugsEnhanceDGUG
wwweert123 Nov 5, 2023
5a5dc49
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 5, 2023
13f5f72
Merge branch 'master' into Branch-PEBugFix
Nov 5, 2023
03c0c58
Add PPP
Nov 5, 2023
a93e83d
Rename PPP file to be in lower case
Nov 5, 2023
7694949
Merge pull request #192 from NeoMinWei/Branch-PEBugFix
NeoMinWei Nov 6, 2023
f07b5b0
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 6, 2023
24f5843
Remove activation bars for ref sd
ryan1604 Nov 6, 2023
3a11b37
Merge branch 'master' into branch-bugfix
ryan1604 Nov 6, 2023
08d0112
Update overview command
ryan1604 Nov 6, 2023
9a4f943
Add JUnit testing for DeleteCashflowCommand
Nov 6, 2023
bd8a8bf
Add JUnit test for Cashflow
Nov 6, 2023
2df3f93
Update JUnit tests in CashflowList and AddCashflowCommand to include …
Nov 6, 2023
d9bd60d
Add fullstops to exception messages
Nov 6, 2023
72a16ae
Fix JUnit
Nov 6, 2023
3a0fb32
Rename method to follow camelCase
Nov 6, 2023
f52f1e1
Add javadoc comments
Nov 7, 2023
52da987
Update text ui test
Nov 7, 2023
e2ebbe9
Add fullstop to error message
Nov 7, 2023
c3c411b
Refactor help command structure:
YFshadaow Nov 7, 2023
932b6e9
Update DG and UG
ryan1604 Nov 7, 2023
700392d
Fix bug
ryan1604 Nov 7, 2023
578564c
Update Architecture Diagram and fix typo
ryan1604 Nov 8, 2023
878d782
Merge pull request #194 from NeoMinWei/Branch-FinalJunit
NeoMinWei Nov 8, 2023
727ab4b
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 8, 2023
fba7732
Merge pull request #196 from ryan1604/branch-bugfix
ryan1604 Nov 8, 2023
2f2a764
Add javadoc to classes and methods
wwweert123 Nov 8, 2023
8660d42
Add DG value proposition and user profile
wwweert123 Nov 8, 2023
e3d3d00
Add user stories
wwweert123 Nov 8, 2023
1cbae2b
Add term to glossary
wwweert123 Nov 8, 2023
e901e67
Add checkstyle fixes
wwweert123 Nov 8, 2023
dc31f33
Add simple manual testing and fix bugs
wwweert123 Nov 9, 2023
cae5827
Update contributions for PPP
wwweert123 Nov 9, 2023
a11d406
Merge pull request #197 from wwweert123/javadocNDG
wwweert123 Nov 9, 2023
abf2f8c
Merge branch 'master' of https://github.com/YFshadaow/tp into help-co…
YFshadaow Nov 9, 2023
c3ed577
Resolve merge conflicts
YFshadaow Nov 9, 2023
2bf3be5
Finish all command usage and example usage. Add example usage to help…
YFshadaow Nov 9, 2023
c936fb5
Remove comment from build.gradle
YFshadaow Nov 9, 2023
49df5b0
Fix bugs
hshiah Nov 9, 2023
5d6c505
Add find and help commands to user guide
YFshadaow Nov 9, 2023
d579e32
Fix spacing in BudgetCommand.java
YFshadaow Nov 9, 2023
0543ea4
Fix usage of add cashflow command
YFshadaow Nov 9, 2023
56a6742
Fix incorrect exception message due to invocation target exception ca…
YFshadaow Nov 9, 2023
2a25f48
Enhancement of reminder
hshiah Nov 9, 2023
c9cc538
Add list command to UG
Nov 10, 2023
3684545
Fix date format
hshiah Nov 10, 2023
b68d1c2
Fix typo
Nov 10, 2023
ce4b754
Fix incorrect directory in UG
Nov 10, 2023
8f06d05
Merge pull request #200 from YFshadaow/help-command-refactor-and-bug-…
YFshadaow Nov 10, 2023
cac53ac
Merge branch 'master' into hshiah
hshiah Nov 10, 2023
320aa07
Merge pull request #198 from hshiah/hshiah
hshiah Nov 10, 2023
0efce8f
Update readme and aboutus
ryan1604 Nov 10, 2023
cd6c82e
Fix bugs of loading and saving reminder
hshiah Nov 10, 2023
6f23dec
Fix coding style
hshiah Nov 10, 2023
e0b2656
Merge pull request #203 from hshiah/hshiah
hshiah Nov 10, 2023
45e97d6
Merge pull request #202 from ryan1604/branch-ug
ryan1604 Nov 10, 2023
1059aa1
Fix mistakes
wwweert123 Nov 10, 2023
69016f4
Merge pull request #201 from NeoMinWei/Branch-FinalUG
ryan1604 Nov 10, 2023
346f3c7
Solve slf4j binding warning
YFshadaow Nov 10, 2023
e0801c3
Merge pull request #204 from YFshadaow/fix-logger-binding
YFshadaow Nov 10, 2023
593c2db
Fix UG and DG
ryan1604 Nov 11, 2023
aba804b
Merge pull request #205 from ryan1604/branch-bugfix
ryan1604 Nov 11, 2023
3c5ddee
Fix bugs
hshiah Nov 11, 2023
4b8495e
Fix addstock
wwweert123 Nov 11, 2023
19fbd5c
Merge pull request #207 from wwweert123/javadocNDG
wwweert123 Nov 11, 2023
3eda51d
Update UG
hshiah Nov 11, 2023
21ac550
Merge pull request #206 from hshiah/hshiah
hshiah Nov 11, 2023
eb6d563
Add mechanism to tell user that he has input the values wrongly in js…
wwweert123 Nov 11, 2023
3c77204
Add hashing of values to ensure nobody tampers with the json file
wwweert123 Nov 11, 2023
97d75b5
Update UG
wwweert123 Nov 11, 2023
1324840
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 11, 2023
fab38b1
Fix date format in reminder
Nov 11, 2023
07636fc
Add exception thrown when impossible dates are detected
Nov 11, 2023
a207e78
Convert parameter to lowercase for categorizer and visualizer
wwweert123 Nov 11, 2023
8bde6d4
Change load watchlist to take take file path as parameter
wwweert123 Nov 11, 2023
4f29a53
Convert to uppercase when passing stock code into Stock constructor
wwweert123 Nov 11, 2023
b83a06c
Add junit test for watchlist
wwweert123 Nov 11, 2023
31126ff
Add junit test for categorizer and visualizer
wwweert123 Nov 11, 2023
3a03ae7
Add return value for javadoc
wwweert123 Nov 11, 2023
51cedca
Fix typo
wwweert123 Nov 11, 2023
2bdb914
Update PPP
Nov 11, 2023
63c26c2
Merge branch 'master' into javadocNDG
wwweert123 Nov 11, 2023
997c841
Fix bug
Nov 11, 2023
f836550
Fix checkstyle
wwweert123 Nov 11, 2023
5a83f4f
Add new line
wwweert123 Nov 11, 2023
accfb52
Disable test on linx
wwweert123 Nov 11, 2023
76fe341
Merge pull request #208 from wwweert123/javadocNDG
wwweert123 Nov 11, 2023
2ca87af
Update UG
ryan1604 Nov 12, 2023
9192e6c
Add mechanism to disallow adding stock with other fields
wwweert123 Nov 12, 2023
83db9ed
Add setting of fetch time even for invalid stocks
wwweert123 Nov 12, 2023
2a407e4
Reorder UG
ryan1604 Nov 12, 2023
26ea23a
Fix displaying of wrong balance when recurring cashflows are added
Nov 12, 2023
38075f2
Add error handling for recur value exceeding maximum int value
Nov 12, 2023
95babe9
Update user guide
Nov 12, 2023
2afa997
Add error handling for index exceeding max int value
Nov 12, 2023
7b714b0
Update Junit
Nov 12, 2023
efabe5a
Delete note for income type in UG
ryan1604 Nov 12, 2023
94e1308
Last Changes
wwweert123 Nov 12, 2023
4b44100
Fix Vis diagrams
wwweert123 Nov 12, 2023
fadf088
Add watchlist feature to DG
wwweert123 Nov 12, 2023
3612cc8
Add to table of contents
wwweert123 Nov 12, 2023
614e9c9
Merge pull request #210 from ryan1604/branch-bugfix
ryan1604 Nov 12, 2023
36e7556
Update PPP
wwweert123 Nov 12, 2023
e19808b
Fix bugs
hshiah Nov 12, 2023
86e7b72
Fix checkstyle
hshiah Nov 12, 2023
579a5e1
Update Diagrams
wwweert123 Nov 12, 2023
ff1bffa
Update javadoc
hshiah Nov 12, 2023
63f5765
Fix checkstyle
hshiah Nov 12, 2023
1bdd7d3
Merge pull request #209 from NeoMinWei/Branch-ReminderDate
ryan1604 Nov 12, 2023
d8b6e07
Add activation bars to sequence diagrams
Nov 12, 2023
f82fcc7
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp …
Nov 12, 2023
7a20e0f
Fix table of content
wwweert123 Nov 12, 2023
3737520
Add activation diagram
wwweert123 Nov 12, 2023
2e591a2
Change back
wwweert123 Nov 12, 2023
d6dc02d
Merge pull request #211 from wwweert123/javadocNDG
wwweert123 Nov 12, 2023
e7c0591
Add manual testing
wwweert123 Nov 12, 2023
70b7704
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp …
Nov 12, 2023
587ce36
Fix typo
wwweert123 Nov 12, 2023
941be64
Merge pull request #214 from wwweert123/javadocNDG
wwweert123 Nov 12, 2023
6721762
Add manual testing
Nov 12, 2023
85c469f
Update manual testing
Nov 12, 2023
fad742f
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp …
Nov 12, 2023
0d03642
Add manual testing
ryan1604 Nov 12, 2023
889370d
Finished test and fix bugs.
hshiah Nov 12, 2023
55ae6a6
Merge pull request #213 from NeoMinWei/Branch-ReminderDate
NeoMinWei Nov 12, 2023
c417ab5
Merge branch 'master' into branch-bugfix
ryan1604 Nov 12, 2023
65663a8
Merge pull request #215 from ryan1604/branch-bugfix
ryan1604 Nov 12, 2023
c1e591c
Final update
hshiah Nov 12, 2023
558f765
Merge branch 'master' into hshiah
hshiah Nov 12, 2023
7cc98dc
Update SetGoalCommandTest.java
hshiah Nov 12, 2023
57b5961
Update AddReminderCommandTest.java
hshiah Nov 12, 2023
ff4a734
Update ReminderListCommand.java
hshiah Nov 13, 2023
829d36a
Merge pull request #212 from hshiah/hshiah
hshiah Nov 13, 2023
7b3be7b
Fix bug in UGDG
ryan1604 Nov 13, 2023
ea272b6
Update PPP
ryan1604 Nov 13, 2023
730afd0
Fix broken link
wwweert123 Nov 13, 2023
8cc3fec
Add fix that you can only add stocks in capital letters using file
wwweert123 Nov 13, 2023
9bd2f73
Merge pull request #216 from ryan1604/branch-bugfix
ryan1604 Nov 13, 2023
d4d6562
Merge pull request #217 from wwweert123/changesDG
wwweert123 Nov 13, 2023
875b0ab
Fix broken link
wwweert123 Nov 13, 2023
1f3e3e5
Merge pull request #218 from wwweert123/changesDG
wwweert123 Nov 13, 2023
1852642
Add about us
wwweert123 Nov 13, 2023
fbeda55
Merge pull request #219 from wwweert123/changesDG
wwweert123 Nov 13, 2023
9b7a4b7
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 13, 2023
a7bbd83
Fix DG and UG
wwweert123 Nov 13, 2023
6f57dc6
Fix
wwweert123 Nov 13, 2023
1e59dff
fix typo
wwweert123 Nov 13, 2023
4a5e4e4
Merge pull request #220 from wwweert123/changesDG
wwweert123 Nov 13, 2023
6bff288
Fix bug in UG
ryan1604 Nov 13, 2023
2a15144
Merge pull request #221 from ryan1604/branch-bugfix
ryan1604 Nov 13, 2023
3a324b7
Add fix
wwweert123 Nov 13, 2023
99b8c54
Merge branch 'master' of https://github.com/AY2324S1-CS2113-T18-2/tp
Nov 13, 2023
1c915c4
Merge pull request #222 from wwweert123/changesDG
wwweert123 Nov 13, 2023
e4f7d1e
Update add cashflow explanations
Nov 13, 2023
0b7dbb5
Merge pull request #223 from NeoMinWei/Branch-DGQuickFix
NeoMinWei Nov 13, 2023
9c15ad8
Fix bug
ryan1604 Nov 13, 2023
bdb553a
Fix bug
ryan1604 Nov 13, 2023
30ef4ff
Merge pull request #224 from ryan1604/branch-bugfix
ryan1604 Nov 13, 2023
c4a964a
Final Final FInal Final changes
wwweert123 Nov 14, 2023
2de04b7
Merge pull request #225 from wwweert123/changesDG
wwweert123 Nov 14, 2023
80da84b
Add project portfolio page
YFshadaow Nov 14, 2023
e97054c
Merge pull request #226 from YFshadaow/yfshadaow-project-portfolio-page
YFshadaow Nov 14, 2023
be44706
Update aboutus page
YFshadaow Nov 14, 2023
708646a
Merge pull request #227 from YFshadaow/yfshadaow-project-portfolio-page
YFshadaow Nov 14, 2023
878b5ac
Remove the non-existing John Doe from AboutUs.md
YFshadaow Nov 14, 2023
3b2bd80
Merge pull request #228 from YFshadaow/yfshadaow-project-portfolio-page
YFshadaow Nov 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
data/
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ repositories {
dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
implementation group: 'org.knowm.xchart', name: 'xchart', version: '3.2.2'
}

test {
Expand All @@ -29,7 +32,7 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("seedu.financialplanner.FinancialPlanner")
}

shadowJar {
Expand All @@ -43,4 +46,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
15 changes: 8 additions & 7 deletions docs/AboutUs.md
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) | 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) | Ryan Chua | [Github](https://github.com/ryan1604) | [Portfolio](docs/team/ryanchua.md)
![](https://via.placeholder.com/100.png?text=Photo) | Neo Min Wei | [Github](https://github.com/NeoMinWei) | [Portfolio](docs/team/NeoMinWei.md)
![](https://via.placeholder.com/100.png?text=Photo) | Frederick | [Github](https://github.com/) | [Portfolio](docs/team/frederick.md)

3 changes: 3 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
remote_theme: pages-themes/[email protected]
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one
2 changes: 1 addition & 1 deletion docs/team/johndoe.md → docs/team/NeoMinWei.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# John Doe - Project Portfolio Page
# Neo Min Wei - Project Portfolio Page

## Overview

Expand Down
5 changes: 5 additions & 0 deletions docs/team/frederick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
I am Frederick

Hello

I am from this team!
Empty file added docs/team/ryanchua.md
Empty file.
21 changes: 0 additions & 21 deletions src/main/java/seedu/duke/Duke.java

This file was deleted.

60 changes: 60 additions & 0 deletions src/main/java/seedu/financialplanner/FinancialPlanner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package seedu.financialplanner;

import seedu.financialplanner.commands.AbstractCommand;
import seedu.financialplanner.commands.ExitCommand;
import seedu.financialplanner.exceptions.FinancialPlannerException;
import seedu.financialplanner.investments.WatchList;
import seedu.financialplanner.list.CashflowList;
import seedu.financialplanner.storage.Storage;
import seedu.financialplanner.utils.Parser;
import seedu.financialplanner.utils.Ui;

public class FinancialPlanner {

private static final String FILE_PATH = "data/data.txt";
private final Storage storage = Storage.INSTANCE;
private final Ui ui = Ui.INSTANCE;
private final WatchList watchList = WatchList.INSTANCE;
private final CashflowList cashflowList = CashflowList.INSTANCE;

private FinancialPlanner() {
}

public static void main(String[] args) {
new FinancialPlanner().run();
}

public void run() {
try {
storage.load(cashflowList, ui, FILE_PATH);
} catch (FinancialPlannerException e) {
ui.showMessage(e.getMessage());
return;
}

FinancialPlannerLogger.initialise();
ui.welcomeMessage();
String input;
AbstractCommand command = null;

while (!(command instanceof ExitCommand)) {
input = ui.input();
try {
command = Parser.parseCommand(input);
command.execute();
} catch (Exception e) {
ui.showMessage(e.getMessage());
}
}
save();
ui.exitMessage();
}

public void save() {
try {
storage.save(cashflowList, FILE_PATH);
} catch (FinancialPlannerException e) {
ui.showMessage(e.getMessage());
}
}
}
23 changes: 23 additions & 0 deletions src/main/java/seedu/financialplanner/FinancialPlannerLogger.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package seedu.financialplanner;

import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.logging.LogManager;

public class FinancialPlannerLogger {
private static Logger logger = Logger.getLogger("Financial Planner Logger");

public static void initialise() {
try {
FileHandler fh = new FileHandler("data/logger.log");
LogManager.getLogManager().reset();
logger.addHandler(fh);
fh.setFormatter(new SimpleFormatter());
logger.log(Level.INFO, "Logger initialised");
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package seedu.financialplanner.commands;

public abstract class AbstractCommand {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to put abstract in the class name

public abstract void execute() throws Exception;
}
112 changes: 112 additions & 0 deletions src/main/java/seedu/financialplanner/commands/AddCashflowCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
package seedu.financialplanner.commands;

import seedu.financialplanner.enumerations.CashflowCategory;
import seedu.financialplanner.list.Budget;
import seedu.financialplanner.list.Cashflow;
import seedu.financialplanner.list.CashflowList;
import seedu.financialplanner.utils.Ui;

import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;


public class AddCashflowCommand extends AbstractCommand {

private static Logger logger = Logger.getLogger("Financial Planner Logger");
protected double amount;
protected CashflowCategory category;
protected String type;
protected int recur = 0;

public AddCashflowCommand(RawCommand rawCommand) throws IllegalArgumentException {
String typeString = String.join(" ", rawCommand.args);
try {
logger.log(Level.INFO, "Parsing CashflowCategory");
category = CashflowCategory.valueOf(typeString.toUpperCase());
} catch (IllegalArgumentException e) {
logger.log(Level.WARNING, "Invalid arguments for CashflowCategory");
throw new IllegalArgumentException("Entry must be either income or expense");
}

if (!rawCommand.extraArgs.containsKey("a")) {
logger.log(Level.WARNING, "Missing arguments for amount");
throw new IllegalArgumentException("Entry must have an amount");
}
try {
logger.log(Level.INFO, "Parsing amount as double");
amount = Double.parseDouble(rawCommand.extraArgs.get("a"));
} catch (IllegalArgumentException e) {
logger.log(Level.WARNING, "Invalid arguments for amount");
throw new IllegalArgumentException("Amount must be a number");
}
if (amount < 0) {
logger.log(Level.WARNING, "Invalid value for amount");
throw new IllegalArgumentException("Amount cannot be negative");
}
rawCommand.extraArgs.remove("a");

if (!rawCommand.extraArgs.containsKey("t")) {
logger.log(Level.WARNING, "Missing arguments for type");
throw new IllegalArgumentException("Entry must have a type");
}
type = rawCommand.extraArgs.get("t");
if (type.isBlank()) {
logger.log(Level.WARNING, "Invalid arguments for type");
throw new IllegalArgumentException("Type cannot be left empty");
}
rawCommand.extraArgs.remove("t");

if (rawCommand.extraArgs.containsKey("r")) {
try {
logger.log(Level.INFO, "Parsing recur as integer");
recur = Integer.parseInt(rawCommand.extraArgs.get("r"));
} catch (IllegalArgumentException e) {
logger.log(Level.WARNING, "Invalid arguments for recur");
throw new IllegalArgumentException("Recurrence must be an integer");
}
rawCommand.extraArgs.remove("r");
}
if (recur < 0) {
logger.log(Level.WARNING, "Invalid value for recur");
throw new IllegalArgumentException("Recurring value cannot be negative");
}

if (!rawCommand.extraArgs.isEmpty()) {
String unknownExtraArgument = new ArrayList<>(rawCommand.extraArgs.keySet()).get(0);
logger.log(Level.WARNING, "Invalid extra arguments found");
throw new IllegalArgumentException(String.format("Unknown extra argument: %s", unknownExtraArgument));
}
}

@Override
public void execute() {
assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);
assert recur >= 0;
assert amount >= 0;
assert type != null;

switch (category) {
case INCOME:
CashflowList.INSTANCE.addIncome(amount, type, recur);
break;
case EXPENSE:
CashflowList list = CashflowList.INSTANCE;
list.addExpense(amount, type, recur);
if (Budget.hasBudget()) {
deductFromBudget(list.list.get(list.list.size() - 1));
}
break;
default:
logger.log(Level.SEVERE, "Unreachable default case reached");
Ui.INSTANCE.showMessage("Unidentified entry.");
break;
}
}

private static void deductFromBudget(Cashflow entry) {
double expenseAmount = entry.getAmount();
Budget.deduct(expenseAmount);
Ui.INSTANCE.printBudgetAfterDeduction();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package seedu.financialplanner.commands;
import seedu.financialplanner.reminder.ReminderList;
import seedu.financialplanner.reminder.Reminder;
import seedu.financialplanner.utils.Ui;
public class AddReminderCommand extends AbstractCommand{
private final String type;
private final String date;

public AddReminderCommand(RawCommand rawCommand) throws IllegalArgumentException {
String typeString = String.join(" ", rawCommand.args);
if(!rawCommand.extraArgs.containsKey("t")){
throw new IllegalArgumentException("Reminder must have a type");
}
type = rawCommand.extraArgs.get("t");
rawCommand.extraArgs.remove("t");
if(!rawCommand.extraArgs.containsKey("d")){
throw new IllegalArgumentException("Reminder must have a date");
}
date = rawCommand.extraArgs.get("d");
rawCommand.extraArgs.remove("d");
if(!rawCommand.extraArgs.isEmpty()){
String unknownExtraArgument = new java.util.ArrayList<>(rawCommand.extraArgs.keySet()).get(0);
throw new IllegalArgumentException(String.format("Unknown extra argument: %s", unknownExtraArgument));
}
}

@Override
public void execute() {
ReminderList.INSTANCE.list.add(new Reminder(type, date));
Ui.INSTANCE.showMessage("Reminder added!");
}
}
47 changes: 47 additions & 0 deletions src/main/java/seedu/financialplanner/commands/AddStockCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package seedu.financialplanner.commands;

import seedu.financialplanner.exceptions.FinancialPlannerException;
import seedu.financialplanner.investments.WatchList;
import seedu.financialplanner.utils.Ui;

import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

public class AddStockCommand extends AbstractCommand {
private static final Logger logger = Logger.getLogger("Financial Planner Logger");
private final String stockCode;

public AddStockCommand(RawCommand rawCommand) throws IllegalArgumentException {
if (!rawCommand.extraArgs.containsKey("s")) {
throw new IllegalArgumentException("Stock code cannot be empty");
}

logger.log(Level.INFO, "Parsing stockcode from input");
stockCode = rawCommand.extraArgs.get("s");

rawCommand.extraArgs.remove("s");
if (!rawCommand.extraArgs.isEmpty()) {
String unknownExtraArgument = new ArrayList<>(rawCommand.extraArgs.keySet()).get(0);
logger.log(Level.WARNING, "Invalid extra arguments found");
throw new IllegalArgumentException(String.format("Unknown extra argument: %s", unknownExtraArgument));
}
}

@Override
public void execute() {
Ui ui = Ui.INSTANCE;
WatchList watchList = WatchList.INSTANCE;
String stockName;

logger.log(Level.INFO, "adding stock to watchlist");
try {
stockName = watchList.addStock(stockCode);
assert stockName != null;
ui.printAddStock(stockName);
} catch (FinancialPlannerException e) {
logger.log(Level.SEVERE, "Error adding stock to watchlist");
System.out.println(e.getMessage());
}
}
}
Loading
Loading