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

[CS2113T-T10-1] SplitLah #8

Open
wants to merge 2,719 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
2719 commits
Select commit Hold shift + click to select a range
4dd8583
Add test section for session delete command
froststein Apr 10, 2022
d6b0d74
Add test section for session edit command
froststein Apr 10, 2022
76a2b5b
Merge pull request #484 from warrencxw/branch-cleanup
froststein Apr 10, 2022
2756285
Update to sort in alphabetical order
Apr 10, 2022
d8526ab
Update test cases to follow overall standardisation
Apr 10, 2022
6ec2dcc
Update expected.txt to include dollar sign
Apr 10, 2022
bd7bd24
Amend grammar
froststein Apr 10, 2022
8b47b89
Add for test cases for session edit command in DG
froststein Apr 10, 2022
59dc1b1
Add test section for group create command
froststein Apr 10, 2022
62773c1
Add test section for group delete command
froststein Apr 10, 2022
affd680
Add test section for group edit command
froststein Apr 10, 2022
00b8983
Add test section for storage
froststein Apr 10, 2022
7e61090
Add trailing white spaces
Apr 10, 2022
81c4b1f
Amend sentence structure
froststein Apr 10, 2022
892a06f
Amend more sentence structures
froststein Apr 10, 2022
fb94991
Amend spelling mistake
froststein Apr 10, 2022
ee611b1
Amend phrasing
froststein Apr 10, 2022
892486a
Merge branch 'master' into docs-developerguide
warrencxw Apr 10, 2022
07a9f31
Merge pull request #487 from froststein/docs-developerguide
ivanaitzliddat Apr 10, 2022
3186f5d
Merge pull request #486 from ivanaitzliddat/branch-activity
froststein Apr 10, 2022
bd56f3a
Update user stories to remove capitalisation of user
Apr 10, 2022
c4e457b
Merge branch 'master' into branch-developerGuide
Apr 10, 2022
9eb3ee2
Update test cases to follow overall standardisation
Apr 10, 2022
fe652ae
Fix error in test scenario 3 of session create
Apr 10, 2022
d3c8974
Move isSamePersonList method to PersonList object class
lelerer Apr 10, 2022
3c7c517
fix group edit bug
lelerer Apr 10, 2022
7a08496
Remove error message
lelerer Apr 10, 2022
48a63eb
Fix checkstyle error
lelerer Apr 10, 2022
b746f99
Change the phrasing of error message
lelerer Apr 10, 2022
5a3ff19
Align messages and fix checkstyle error
lelerer Apr 10, 2022
1ea8cdd
Change error message name
lelerer Apr 10, 2022
f7ab968
Add ActitivityViewCommand and ActitivityListCommand sequence diagram
lelerer Apr 10, 2022
ea50082
Add group /edit command DG explanation
lelerer Apr 10, 2022
3f5b9ca
Remove some lines
lelerer Apr 11, 2022
eb13fe3
Update PPP
lunespell Apr 11, 2022
46de465
Update ppp
lunespell Apr 11, 2022
5a1a6ea
Update PPP
lunespell Apr 11, 2022
f23bff9
Update ppp
lunespell Apr 11, 2022
904f0b2
Delete the use of a variable
lelerer Apr 11, 2022
2d50374
Change the order of check
lelerer Apr 11, 2022
dcc7842
Fix some bugs
lelerer Apr 11, 2022
de9de9e
Add Person tests, remove unused code from Person
lunespell Apr 11, 2022
24923d3
Fix test assert statement
lunespell Apr 11, 2022
d27ee86
Update ppp
lunespell Apr 11, 2022
f4569a7
Fix bug
lelerer Apr 11, 2022
8da7b0a
Abstract out methods for SLAP
lunespell Apr 11, 2022
c8de0dc
Merge pull request #478 from lelerer/fixGroupEdit
ivanaitzliddat Apr 11, 2022
de07e2e
Update diagram
lelerer Apr 11, 2022
9a161e9
Update DG
lelerer Apr 11, 2022
65b2f21
Merge remote-tracking branch 'origin/master' into DG
lelerer Apr 11, 2022
2c87c92
Add Test case for activity view in DG
froststein Apr 11, 2022
43aed5c
Update to follow overall standardisation
Apr 11, 2022
30ab796
Add UG GroupEdit explanation
lelerer Apr 11, 2022
ae51d5e
Add in explanation
lelerer Apr 11, 2022
f1feb55
Merge pull request #490 from froststein/docs-developerguide
ivanaitzliddat Apr 11, 2022
b3fb330
Update session list command sequence diagram
Apr 11, 2022
2465962
Add activity list and activity view sequence diagrams
Apr 11, 2022
e17e0cb
Replace prepare function with command parser in Message class
warrencxw Apr 11, 2022
76f2c18
Print message if no details are changed
lunespell Apr 11, 2022
cb2c344
Remove unused variable in Activity Class
froststein Apr 11, 2022
971b1b4
Remove unused methods in ActivityCost Class
froststein Apr 11, 2022
6c759aa
Remove unused methods in Person Class
froststein Apr 11, 2022
c3babcc
Remove unused methods in PersonList Class
froststein Apr 11, 2022
e92cd2c
Remove unused methods in TableFormatter Class
froststein Apr 11, 2022
32c0b3c
Remove unused methods in TextUI Class
froststein Apr 11, 2022
837de3e
Update PPP
lelerer Apr 11, 2022
6cc0459
Remove unused methods in PersonCostPair Class
froststein Apr 11, 2022
951f06b
Add documentation
lunespell Apr 11, 2022
6c07949
Update SessionEditCommand implementation
froststein Apr 11, 2022
cde98ab
Fix checkstyle errors
lunespell Apr 11, 2022
7fe42d2
Merge pull request #488 from matheril/ppp
warrencxw Apr 11, 2022
68ff05f
Update developer guide for ActivityEditCommand
lunespell Apr 11, 2022
400e9f1
Add workflow for activity view command
Apr 11, 2022
8ac367b
Update ActivityViewCommand DG
lelerer Apr 11, 2022
f901f3e
Merge branch 'master' into branch-developerGuide
Apr 11, 2022
5da7f99
Rename a diagram file
lelerer Apr 11, 2022
c3e18c6
Update GroupEditCommand sequence diagram
lelerer Apr 11, 2022
a193bf6
Add JUnit tests
lunespell Apr 11, 2022
3041822
Update sequence diagram
lunespell Apr 11, 2022
6f6537f
Update format of if else statements
Apr 11, 2022
1f5760e
Merge pull request #491 from lelerer/DG
ivanaitzliddat Apr 11, 2022
ddfa95e
Merge branch 'master' into branch-developerGuide
Apr 11, 2022
7b41b72
Merge pull request #489 from matheril/PersonTest
warrencxw Apr 11, 2022
9e31516
Update screenshots in UG
froststein Apr 11, 2022
377d9d3
Amend UG explanation
froststein Apr 11, 2022
a59d11d
Add test cases for activity list
Apr 11, 2022
7d4eadb
Update Activity command section in UG
froststein Apr 11, 2022
56f4521
Update test cases for activity create
Apr 11, 2022
2790d74
Replace mentioning of function with method in PersonList class
warrencxw Apr 11, 2022
339e7b7
Replace mentioning of function with method in JUnit test for Profile
warrencxw Apr 11, 2022
f84e8f5
Update group command for UG
froststein Apr 11, 2022
d289ef5
Add test cases for activity edit
Apr 11, 2022
b8f1924
Merge pull request #493 from froststein/branch-bugfix-and-testing
warrencxw Apr 11, 2022
1207174
Update the line between each section
Apr 11, 2022
5fb2cf5
Update PPP to include text-based testing
warrencxw Apr 11, 2022
3c897a0
Remove redundant lines between each section
Apr 11, 2022
159db1a
Merge pull request #495 from warrencxw/branch-cleanup
froststein Apr 11, 2022
a9104d2
Update .gitignore
lunespell Apr 11, 2022
f738ba7
Update explanation in sections for PPP
froststein Apr 11, 2022
b088bdc
Change sequence diagram for ActivityEditCommand
lunespell Apr 11, 2022
b8332b6
Fix typo in DG and remove unused import
lunespell Apr 11, 2022
6789a79
Merge pull request #496 from froststein/about-us
ivanaitzliddat Apr 11, 2022
0ab728e
Add index.css for UG
froststein Apr 11, 2022
ce4b20c
Update UG to include back button
froststein Apr 11, 2022
8d68765
Update workflow for group edit command
Apr 11, 2022
0043477
Update link to ref group update diagram
Apr 11, 2022
a02dd12
Fix css class for UG
froststein Apr 11, 2022
21922d6
Update capitalisation of splitlah
Apr 11, 2022
4dc996a
Update UG style
froststein Apr 11, 2022
42c59f4
Update style.css for UG
froststein Apr 11, 2022
39967b3
Add back button for session management section
froststein Apr 11, 2022
9bf20ff
Update session management style
froststein Apr 11, 2022
6fe0130
Add back button for activity and group management in UG
froststein Apr 11, 2022
42f4bd2
Amend style.css
froststein Apr 11, 2022
83d41c8
Update hr tag styling
froststein Apr 11, 2022
57dcdf3
Add test style for codeblock
froststein Apr 11, 2022
363f5ce
Update codeblock style
froststein Apr 11, 2022
25d4e18
Update codeblock style
froststein Apr 11, 2022
30287f2
Shift button placement
froststein Apr 11, 2022
df459b4
Remove overview for transaction management
froststein Apr 11, 2022
f66f566
Add bolding to keywords
froststein Apr 11, 2022
9090645
Add linebreak
froststein Apr 11, 2022
e6a5ca3
Merge pull request #497 from froststein/docs-userguide
warrencxw Apr 11, 2022
ae87fad
Update group edit command to improve presentation
Apr 11, 2022
834e4ed
Merge branch 'master' into branch-ppp
Apr 11, 2022
def344e
Update PPP
lelerer Apr 11, 2022
6671139
Update formatting for PPP under new features
warrencxw Apr 11, 2022
fe66ae2
Update formatting of PPP under enhancements
warrencxw Apr 11, 2022
088eb61
Add hyperlink references under miscellaneous contributions
warrencxw Apr 11, 2022
10cc77b
Add PE dry run bug hunt as part of contributions
warrencxw Apr 11, 2022
6521af5
Add pull request review as part of miscellaneous contributions
warrencxw Apr 11, 2022
8aaae87
Add additional information regarding features
Apr 11, 2022
8f2f81f
Update activity view sequence diagram to align cross
Apr 11, 2022
6695294
Update PPP to include new contributions
froststein Apr 11, 2022
f845481
Merge pull request #485 from ivanaitzliddat/branch-developerGuide
froststein Apr 11, 2022
d3fbfaa
Add section for Instructions for Manual Testing under DG
warrencxw Apr 11, 2022
5f89253
Merge pull request #499 from froststein/about-us
warrencxw Apr 11, 2022
cda66d8
Add buttons for back navigation for DG
froststein Apr 11, 2022
a92c663
Add more description to PersonCostPair
warrencxw Apr 11, 2022
80d60b8
Merge pull request #498 from ivanaitzliddat/branch-ppp
warrencxw Apr 11, 2022
48c1889
Merge pull request #500 from warrencxw/about-us-Warren
froststein Apr 11, 2022
967f2ce
Update ppp
lunespell Apr 11, 2022
cc6007e
Fix sequence diagram
lunespell Apr 11, 2022
18c3303
Merge remote-tracking branch 'origin/master' into PPP
lelerer Apr 11, 2022
9a9558d
Merge branch 'master' into ActivityEditNoChanges
lunespell Apr 11, 2022
0c234f7
Merge branch 'master' into ppp
lunespell Apr 11, 2022
0343d44
Update PPP under new style
lelerer Apr 11, 2022
1fdae2d
Add hr tag and back buttons for DG
froststein Apr 11, 2022
948eead
Update the location of warnings in TOC
warrencxw Apr 11, 2022
8e6032a
Update splitlah.jar to SplitLah.jar
warrencxw Apr 11, 2022
4054374
Update naming conventions
froststein Apr 11, 2022
e85b1b7
Align table of contents under Activity Management
warrencxw Apr 11, 2022
cd5a99c
Remove unnecessary hr tag
warrencxw Apr 11, 2022
74e86a0
Add back to contents button after FAQ
warrencxw Apr 11, 2022
3e22f1c
Update how to use this user guide
warrencxw Apr 11, 2022
b8c7f94
Add more buttons for navigations in DG
froststein Apr 11, 2022
bfd4e42
Update PPP
lunespell Apr 11, 2022
a407074
Capitalise first character
lelerer Apr 11, 2022
34b1a50
Add newline to .gitignore
lunespell Apr 11, 2022
78d8356
Merge branch 'ActivityEditNoChanges' of github.com:matheril/tp into A…
lunespell Apr 11, 2022
4ef6799
Add whitespace right of warning symbol
warrencxw Apr 11, 2022
c3ca106
Remove newline from .gitignore
lunespell Apr 11, 2022
8dccd6b
Edit sentence structure in DG
lelerer Apr 11, 2022
6c26460
Merge pull request #494 from lelerer/PPP
froststein Apr 11, 2022
0b5b8be
Update description of a session
warrencxw Apr 11, 2022
6caa652
Merge pull request #492 from matheril/ActivityEditNoChanges
warrencxw Apr 11, 2022
6cbaa94
Merge branch 'master' into about-us
froststein Apr 11, 2022
9f6de93
Update PPP
froststein Apr 11, 2022
3b3978a
Update button navigation
froststein Apr 11, 2022
b52e5fa
Update PPP with new information
froststein Apr 11, 2022
70a8e48
Update ppp
lunespell Apr 11, 2022
451491d
Update navigation button for storage testing
froststein Apr 11, 2022
b47ac38
Update point indentation for github to detect
warrencxw Apr 11, 2022
ce53aca
Update back navigation for launch testing
froststein Apr 11, 2022
7a5d88b
Update PPP
lunespell Apr 11, 2022
50fd4df
Standardise warning segments
warrencxw Apr 11, 2022
ff486d2
Clean up buttons and headers
froststein Apr 11, 2022
08767a4
Standardise italicisation of arguments in user guide
warrencxw Apr 11, 2022
4dabb1a
Update PPP
lunespell Apr 11, 2022
bcca338
Update phrasing for GST and Service charge
warrencxw Apr 11, 2022
e3e091a
Update glossary table
froststein Apr 11, 2022
7d5527b
Bold all code blocks
warrencxw Apr 11, 2022
567616e
Italicise all cost values in examples
warrencxw Apr 11, 2022
8d4a7ef
Amend DG tables
froststein Apr 11, 2022
db7bb2b
Merge pull request #504 from matheril/ppp
froststein Apr 11, 2022
c9aaa20
Add glossary table
froststein Apr 11, 2022
187a122
Update glossary table
froststein Apr 11, 2022
2801e9a
Update glossary
froststein Apr 11, 2022
ab7b741
Remove extra lines for glossary
froststein Apr 11, 2022
da06beb
Standardise all edit commands
warrencxw Apr 11, 2022
acc21db
Rephrase sentence structure for DG
froststein Apr 11, 2022
74ac34b
Remove codeblocks in glossary
froststein Apr 11, 2022
3acc61b
Update glossary table
froststein Apr 11, 2022
f7b5a4a
Update ActivityTesting section
lunespell Apr 11, 2022
e2e7e36
Standardize "unique identifier" phrase
lunespell Apr 11, 2022
27a2045
Rephrase example in activity edit
warrencxw Apr 11, 2022
2669cb7
Add explanation for back to ToC buttons in how to use user guide
warrencxw Apr 11, 2022
1886fb3
Update phrasing in user guide
warrencxw Apr 11, 2022
8909639
Update link for list of sessionin list of groups
froststein Apr 11, 2022
67e974b
Update ref link
froststein Apr 11, 2022
ad623c6
Merge branch 'docs-developerguide' of https://github.com/froststein/t…
froststein Apr 11, 2022
a169618
Update group create description
warrencxw Apr 11, 2022
07b522a
Remove extra line in DG
froststein Apr 11, 2022
b3b0140
Update group create section
warrencxw Apr 11, 2022
149cac5
Merge pull request #502 from froststein/docs-developerguide
warrencxw Apr 11, 2022
f4bf5dc
Merge branch 'master' into about-us
froststein Apr 11, 2022
068eda1
Fix sequence diagrams
lunespell Apr 11, 2022
582e152
Remove unused sequence diagram
lunespell Apr 11, 2022
6216a1b
Add the word existing to several items in user guide
warrencxw Apr 11, 2022
5de6935
Merge branch 'master' into DG
lunespell Apr 11, 2022
7a0b3d8
Update command format for Activity Edit
warrencxw Apr 11, 2022
b651831
Merge pull request #503 from froststein/about-us
warrencxw Apr 11, 2022
9193722
Merge pull request #506 from matheril/SequenceDiagram
froststein Apr 11, 2022
adea654
Fix GroupEditCommand diagram
lunespell Apr 11, 2022
fa35471
Merge branch 'DG' of github.com:matheril/tp into DG
lunespell Apr 11, 2022
065711d
Fix sequence diagrams
lunespell Apr 11, 2022
fc7c407
Fix sequence diagram
lunespell Apr 11, 2022
4fb7162
Fix table of contents capitalisation
lunespell Apr 11, 2022
dfa7ded
Removed merge conflict diagrams
lunespell Apr 11, 2022
0dab1f1
Add sequence diagrams
lunespell Apr 11, 2022
990fbee
Merge branch 'master' into DG
lunespell Apr 11, 2022
18a4e7d
Merge pull request #505 from matheril/DG
froststein Apr 11, 2022
f734a70
Merge pull request #501 from warrencxw/branch-cleanup
froststein Apr 11, 2022
437545f
Merge branch 'master' into branch-ppp
Apr 11, 2022
41a3261
Remove <hr>
lelerer Apr 11, 2022
05cd543
Update ppp to fit page limit
Apr 11, 2022
fc892ee
Remove unnecessary section
lelerer Apr 11, 2022
da23b70
Update PPP to exclude additional sections
froststein Apr 11, 2022
cbd95ee
Add title
Apr 11, 2022
369571f
Minimise PPP
warrencxw Apr 11, 2022
08e8faf
Clean up PPP
froststein Apr 11, 2022
548012f
Clean up PPP
froststein Apr 11, 2022
faf7a3c
Update ppp
lunespell Apr 11, 2022
c6dcafe
Update ppp
lunespell Apr 11, 2022
780a877
Further minimisation of PPP
warrencxw Apr 11, 2022
5a87788
Merge pull request #507 from ivanaitzliddat/branch-ppp
froststein Apr 11, 2022
7c46a09
Merge pull request #508 from lelerer/PPP
froststein Apr 11, 2022
d8a993f
Merge pull request #509 from froststein/about-us
ivanaitzliddat Apr 11, 2022
eea6489
Merge pull request #510 from matheril/ppp
ivanaitzliddat Apr 11, 2022
3375ffb
Update indentation of header
Apr 11, 2022
eafd52e
Fix typo
lunespell Apr 11, 2022
2d6842d
Merge branch 'master' into branch-ppp
Apr 11, 2022
d7de16b
Merge pull request #511 from warrencxw/about-us-Warren
ivanaitzliddat Apr 11, 2022
f847f60
Merge pull request #513 from matheril/ppp
ivanaitzliddat Apr 11, 2022
d74414a
Merge pull request #512 from ivanaitzliddat/branch-ppp
lunespell Apr 11, 2022
871d25c
Remove one line
lunespell Apr 11, 2022
008a782
Remove name
lunespell Apr 11, 2022
db09f09
Fix ppp
lunespell Apr 11, 2022
7427228
Fix ppp
lunespell Apr 11, 2022
ef369f8
Merge pull request #514 from matheril/ppp
warrencxw Apr 11, 2022
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ src/main/resources/docs/
bin/

/text-ui-test/ACTUAL.txt
text-ui-test/EXPECTED-UNIX.TXT
/text-ui-test/ACTUAL.TXT
/text-ui-test/EXPECTED-UNIX.txt
/text-ui-test/EXPECTED-UNIX.TXT

# Storage files
/data/
/data/SplitLah.data
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ test {
}

application {
mainClassName = "seedu.duke.Duke"
mainClassName = "seedu.splitlah.SplitLah"
}

shadowJar {
archiveBaseName = "duke"
archiveBaseName = "splitlah"
archiveClassifier = null
}

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

run{
standardInput = System.in
enableAssertions = true
}
14 changes: 7 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# About us

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
Display | Name | Github Profile | Portfolio
--------|:--------:|:-------------------------------------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Ivan | [Github](https://github.com/ivanaitzliddat) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ren Tianle | [Github](https://github.com/lelerer) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Saurav | [Github](https://github.com/matheril) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Roy Tang | [Github](https://github.com/froststein) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Warren Chong Xu Wei | [Github](https://github.com/warrencxw) | [Portfolio](docs/team/johndoe.md)
414 changes: 396 additions & 18 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Duke
# SplitLah

SplitLah is an application for keeping track of expenses during group outing sessions, specifically for those
who are budget conscious. It then proceeds to split the expenses according to the group members' individual costs for
the activities they participated in, for a particular session, via a Command Line Interface(CLI).

{Give product intro here}

Useful links:
* [User Guide](UserGuide.md)
Expand Down
592 changes: 572 additions & 20 deletions docs/UserGuide.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
theme: jekyll-theme-cayman
markdown: kramdown
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.
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.
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.
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.
Binary file added docs/images/developerguide/RefParseABC.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/developerguide/RefParser.drawio.png
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.
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.
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.
Binary file added docs/images/userguide/ActivityDeleteCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/userguide/ActivityEditCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/userguide/ActivityListCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/userguide/ActivityViewCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/userguide/GroupCreateCommand.png
Binary file added docs/images/userguide/GroupDeleteCommand.png
Binary file added docs/images/userguide/GroupListCommand.png
Binary file added docs/images/userguide/GroupViewCommand.png
Binary file added docs/images/userguide/HelpCommand.png
Binary file added docs/images/userguide/SessionCreateCommand[1].png
Binary file added docs/images/userguide/SessionDeleteCommand.png
Binary file added docs/images/userguide/SessionListCommand.png
Binary file added docs/images/userguide/SessionSummaryCommand.png
Binary file added docs/images/userguide/pngLogo.png
21 changes: 0 additions & 21 deletions src/main/java/seedu/duke/Duke.java

This file was deleted.

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

import seedu.splitlah.command.Command;
import seedu.splitlah.data.Manager;
import seedu.splitlah.parser.Parser;
import seedu.splitlah.ui.Message;

import java.util.logging.Level;

/**
* Entry point of the SplitLah application.
* Initializes SplitLah and starts interacting with the user.
*/
public class SplitLah {
Manager manager;

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

/** Sets up the required objects for application. */
public SplitLah() {
manager = new Manager(true);
}

/** Runs the program until it terminates. */
private void run() {
showWelcomeMessage();
runProcessLoop();
exitApplication();
}

/** Prints welcome message. */
private void showWelcomeMessage() {
manager.getUi().printWelcome();
}

/** Exits the program. */
private void exitApplication() {
Manager.getLogger().log(Level.INFO, Message.LOGGER_SPLITLAH_APPLICATION_EXIT);
System.exit(0);
}

/** Reads the user input until the user enters the exit command. */
private void runProcessLoop() {
Command command;
do {
String userInput = manager.getUi().readNextLine();
command = Parser.getCommand(userInput);
command.run(manager);
} while (!command.isExitCommand());
manager.saveProfile();
}
}
239 changes: 239 additions & 0 deletions src/main/java/seedu/splitlah/command/ActivityCreateCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
package seedu.splitlah.command;

import seedu.splitlah.data.Activity;
import seedu.splitlah.data.Manager;
import seedu.splitlah.data.Person;
import seedu.splitlah.data.Profile;
import seedu.splitlah.data.Session;
import seedu.splitlah.data.PersonList;
import seedu.splitlah.exceptions.InvalidDataException;
import seedu.splitlah.ui.Message;
import seedu.splitlah.ui.TextUI;

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

/**
* Represents a command that creates an Activity object from user input and stores it in the Session object.
*
* @author Ivan
*/
public class ActivityCreateCommand extends Command {

private static final String COMMAND_SUCCESS = "The activity was created successfully.\n";

private final int sessionId;
private final String activityName;
private double totalCost;
private final String payer;
private final String[] involvedList;
private double[] costList;
private final double gst;
private final double serviceCharge;

private static final double ZERO_COST_PAID = 0;
public static final double ZERO_COST_OWED = 0;
private static final int NO_COST = 0;

/**
* Initializes an ActivityCreateCommand object.
*
* @param sessionId An integer that uniquely identifies a session.
* @param activityName A String object that represents the Activity object's name.
* @param totalCost A double that represents total cost of the activity.
* @param payer A String object that represents the name of the person who paid for the activity.
* @param involvedList An array of String objects that represents the names of the persons
* who are involved in the activity.
* @param costList A double array object that represents the respective costs of
* each person involved in the activity.
* @param gst A double that represents the GST percentage to be included for the cost of the activity.
* @param serviceCharge A double that represents the service charge to be included for the cost of the activity.
*/
public ActivityCreateCommand(int sessionId, String activityName, double totalCost, String payer,
String[] involvedList, double[] costList, double gst, double serviceCharge) {
assert sessionId > 0 : Message.ASSERT_ACTIVITYCREATE_SESSION_ID_LESS_THAN_ONE;
assert activityName != null : Message.ASSERT_ACTIVITYCREATE_ACTIVITY_NAME_MISSING;
assert payer != null : Message.ASSERT_ACTIVITYCREATE_PAYER_NAME_MISSING;
assert involvedList != null : Message.ASSERT_ACTIVITYCREATE_INVOLVED_LIST_ARRAY_NULL;
this.sessionId = sessionId;
this.activityName = activityName;
this.totalCost = totalCost;
this.payer = payer;
this.involvedList = involvedList;
this.costList = costList;
this.gst = gst;
this.serviceCharge = serviceCharge;
}

/**
* Adds all relevant activity costs to each involved person's list of activity costs.
*
* @param involvedPersonList An ArrayList object containing Person objects
* each representing a person involved in the activity.
* @param personPaid A Person object representing the person who paid for the activity.
* @param activityId An integer that uniquely identifies an activity.
*/
private void addAllActivityCost(ArrayList<Person> involvedPersonList, Person personPaid, int activityId) {
boolean hasAddedForPersonPaid = false;
for (int i = 0; i < involvedPersonList.size(); i++) {
Person person = involvedPersonList.get(i);
addCostOwedAndCostPaid(personPaid, activityId, i, person);
hasAddedForPersonPaid = isPersonPaid(personPaid, hasAddedForPersonPaid, person);
}
if (!hasAddedForPersonPaid) {
personPaid.addActivityCost(activityId, totalCost, ZERO_COST_OWED);
}
}

/**
* Checks if the Person object currently referred to represents the person who paid for the activity.
*
* @param personPaid A Person object representing the person who paid for the activity.
* @param hasAddedForPersonPaid A boolean representing whether the activity cost has been added for the person who
* paid for the activity.
* @param person A Person object representing the person currently referred to
* among the persons involved.
* @return true if the Person object currently referred to represents the person who paid for the activity,
* hasAddedForPersonPaid otherwise.
*/
private boolean isPersonPaid(Person personPaid, boolean hasAddedForPersonPaid, Person person) {
if (person == personPaid) {
hasAddedForPersonPaid = true;
}
return hasAddedForPersonPaid;
}

/**
* Adds cost owed and cost paid to each individual's list of activity costs.
* Checks if the current person is the person who paid for the activity.
* If it is, the cost paid is set to the total cost of the activity.
* Else, the cost paid is set to 0.
*
* @param personPaid A Person object representing the person who paid for the activity.
* @param activityId An integer that uniquely identifies an activity.
* @param indexOfCostOwed An integer representing the index of the cost owed in the list of costs.
* @param person A person object representing the person whose costs are added to the
* list of activity costs.
*/
private void addCostOwedAndCostPaid(Person personPaid, int activityId, int indexOfCostOwed, Person person) {
if (person == personPaid) {
person.addActivityCost(activityId, totalCost, costList[indexOfCostOwed]);
} else {
person.addActivityCost(activityId, ZERO_COST_PAID, costList[indexOfCostOwed]);
}
}

/**
* Updates cost and list of costs by adding the extra charges and
* checks if cost list or cost was provided by the user.
* If cost was not provided by the user, the list of costs is summed up to get the total cost of the activity.
* Else, the total cost is distributed evenly.
*/
private void updateCostAndCostList() {
boolean isZeroCost = totalCost == NO_COST;
if (isZeroCost) {
updateCostListWithExtraCharges();
calculateTotalCost();
} else {
updateCostWithExtraCharges();
int numberOfPeopleInvolved = involvedList.length;
costList = distributeCostEvenly(numberOfPeopleInvolved);
}
}

/**
* Updates cost list by including the extra charges.
* Extra charges may include GST and service charge.
* Assumption: GST and service charge are non-negative values.
*/
private void updateCostListWithExtraCharges() {
double extraCharges = getExtraCharges();
for (int i = 0; i < costList.length; i++) {
costList[i] *= extraCharges;
}
}

/**
* Updates the total cost of the activity by summing up the costs in the list of costs.
*/
private void calculateTotalCost() {
for (double cost : costList) {
totalCost += cost;
}
}

/**
* Updates total cost by including the extra charges.
* Extra charges may include GST and service charge.
* Assumption: GST and service charge are non-negative values.
*/
private void updateCostWithExtraCharges() {
double extraCharges = getExtraCharges();
totalCost *= extraCharges;
}

/**
* Returns a double representing the extra charges that is to be included in costs of the activity.
*
* @return A double representing the extra charges.
*/
private double getExtraCharges() {
double gstMultiplier = 1 + gst / 100;
double serviceChargeMultiplier = 1 + serviceCharge / 100;
return gstMultiplier * serviceChargeMultiplier;
}

/**
* Returns an array of doubles of the costs that has been distributed evenly
* among the persons involved in the activity.
* Divides the total cost by the number of people involved in the activity.
*
* @param numberOfPeopleInvolved An integer representing the number of people involved in the activity.
* @return An array of doubles representing the costs of each person involved in the activity.
*/
private double[] distributeCostEvenly(int numberOfPeopleInvolved) {
double dividedCost = totalCost / numberOfPeopleInvolved;
double[] costList = new double[numberOfPeopleInvolved];
Arrays.fill(costList, dividedCost);
return costList;
}

/**
* Runs the command to create an Activity object to be stored in a Session object managed by the Profile object.
* Gets relevant parameters to create an Activity object.
* If no errors getting parameters, an Activity object is created and added to the session.
*
* @param manager A Manager object that manages the TextUI, Profile and Storage object.
*/
@Override
public void run(Manager manager) {
boolean hasDuplicates = PersonList.hasNameDuplicates(involvedList);
TextUI ui = manager.getUi();
if (hasDuplicates) {
ui.printlnMessage(Message.ERROR_PERSONLIST_DUPLICATE_NAME_IN_ACTIVITY);
Manager.getLogger().log(Level.FINEST,Message.LOGGER_PERSONLIST_NAME_DUPLICATE_EXISTS_IN_CREATEACTIVITY);
return;
}
try {
updateCostAndCostList();
assert costList != null : Message.ASSERT_ACTIVITYCREATE_COST_LIST_ARRAY_NULL;
assert totalCost > 0 : Message.ASSERT_ACTIVITYCREATE_TOTAL_COST_LESS_THAN_ONE;
Profile profile = manager.getProfile();
Session session = profile.getSession(sessionId);
Person personPaid = session.getPersonByName(payer);
ArrayList<Person> involvedPersonList = session.getPersonListByName(involvedList);
int activityId = profile.getNewActivityId();
addAllActivityCost(involvedPersonList, personPaid, activityId);
Activity activity = new Activity(activityId, activityName, totalCost, personPaid, involvedPersonList);
session.addActivity(activity);
manager.saveProfile();
ui.printlnMessage(COMMAND_SUCCESS + activity);
Manager.getLogger().log(Level.FINEST,Message.LOGGER_ACTIVITYCREATE_ACTIVITY_ADDED + activityId);
} catch (InvalidDataException e) {
ui.printlnMessage(e.getMessage());
Manager.getLogger().log(Level.FINEST,Message.LOGGER_ACTIVITYCREATE_FAILED_ADDING_ACTIVITY
+ "\n" + e.getMessage());
}
}
}
Loading