-
Notifications
You must be signed in to change notification settings - Fork 231
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-T15-3] SplitLiang #47
base: master
Are you sure you want to change the base?
Changes from 250 commits
d8df33b
eaee787
c92c289
64cbad9
841743a
66c1924
cb3faae
a458e11
52bd875
d71d7d6
9c88ef7
25c367a
1414676
1b27b08
2e8ba85
a8f5370
1e91516
759ff18
c266a50
eeb6e75
0e58e56
e165331
2192535
984b55d
1266dd6
1b6bb56
b89385d
a486c1b
e5a705c
7eee70c
f853f23
cd84180
2c2c141
9e5e0e4
f165d19
2475e65
87c0164
3d2ecdc
a91d017
980abdf
894c214
5030a65
5763375
df07df3
ea0d0f6
176f3af
08034e1
7c42336
e426a4f
4cbcb30
39ce4d6
266bf30
e9074be
0f2568d
8c7bc24
833d423
814c0bf
fdcc46c
a45c308
2cef30d
355e570
3bba048
0aba7cc
f8c861e
c3ef76f
87d52c3
109a41e
38793a6
5dab2c4
4ddb382
c904a23
a31a57d
a4632aa
f889558
78f8bc0
1df1518
7efd25d
ff0f8cd
e9a3fe4
98153e5
7f51707
8b983aa
05764fb
33def81
da9a8f0
408d411
f82dcf2
aa74779
e38f85e
34529e3
5353d67
c7508cb
9d6a8f9
069b21d
37a56eb
f00576e
7b70702
55b4c48
345f366
a4ee46e
683afd6
3e3b4bc
e217084
13c4d82
8b58e95
fcac4c8
12fd5ac
971ab09
8759b53
009aa7d
5b5408d
ff8b687
7a851c0
6e257d2
a5f9941
cfba96d
447bd44
fbd56d7
ff62cf2
8b64601
d0d582b
3809f99
6df3306
7ef810e
40efa13
476b66c
4493585
1dad63f
65d0599
0d4b0c0
e873094
b7ac165
80392eb
21f985b
127a073
45c3684
42ff1d5
f97caba
2c24c81
f89fca4
0777372
bdede1b
54f31e5
3dbd1a7
121c495
1fe5537
1933cb0
ac917a4
f79b5f4
0dfd664
52c29c8
9fcc772
845bbf1
80c4acf
ed027ae
2370c6d
3b370ef
4f5167d
8451c8b
ac52b8a
dd32693
f29dbf1
8433e84
027ac5d
9f3d80a
3db653a
d594daf
38b5767
fb9ee98
517c60d
859a750
ce1e8d7
d3305eb
26440ee
ee3befd
3e48d14
dcd8f4c
4460b07
ec62f23
4ddec92
2bbdb1d
7d83e41
704a8aa
04887b4
7434cce
dbc48b6
06f6049
c204142
ae17a21
cdbf47c
c61d96e
e1da67a
1228104
1689508
1ae408f
7c99da4
bbcaa9b
e2c24de
b40d051
0694a78
a6f8a70
f426639
e6242df
02e26e7
a764dd1
f53fc3f
eaaf644
e2f6a0e
3a2502f
4a3f5e1
e13fb50
90afc04
b0cccf6
861e9ea
e0c8abd
6d7890c
479efbd
19e7b62
049181d
3268f87
7e84f3b
e62f934
078e2e8
bd42253
985f673
a7ca71d
0a69f69
72b6b57
f977aa2
c78c6ee
fd6c067
f44d8a4
16f0ef7
e57cf79
ba9bc10
d4e150f
a2f0dda
060536b
e1abea6
df45ef3
03d6b99
6e675ad
5131e72
d2b5be8
07c2791
e4f616f
d7c90f0
a47d19b
89fc295
a9be9c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.TXT | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
data/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# 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) | Hafiz | [Github](https://github.com/hafizuddin-a) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Heng Junxiang | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Akshan | [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) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,28 +2,131 @@ | |
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the | ||
original source as well} | ||
|
||
## Design & implementation | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
||
### Help menu feature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there could be an architecture diagram of the high-level design of the app, of how the different features interact, to make the overall app design clearer |
||
|
||
#### Implementation | ||
|
||
The "help" feature is facilitated by the `Help` class. | ||
It provides a static method `printHelp` to print out a guide on how to use the commands in the application. | ||
`printHelp` can be used in the event the user issues an invalid command | ||
|
||
### Group Creation feature | ||
|
||
#### Implementation | ||
|
||
The "Group Creation" feature is facilitated by the `Group` class. It provides methods to create a new group and manage | ||
group membership. The implementation of this feature is as follows: | ||
|
||
The Group class maintains a list of members as a `private List<User>` field called `members`. | ||
|
||
The `createGroup(String groupName)` method is responsible for creating a new group. It performs the following steps: | ||
|
||
1. Checks if a group with the given `groupName` already exists using the `isGroup(String groupName)` method. | ||
2. If the group does not exist, creates a new `Group` object with the provided `groupName`. | ||
3. Prints a success message indicating that the group has been created. | ||
4. Adds the new `Group` object to the `groups` list. | ||
5. Returns the newly created `Group` object. | ||
6. If the group already exists, prints an error message indicating that the group already exists. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good job on providing detailed steps! It would be helpful to specify how errors are handled in the system. For example, are exceptions thrown, or are error codes returned? |
||
|
||
### Add Member to Group feature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is not very clear how the user commands are parsed, as there is no information about how the basic components (such as Ui, Model, Logic, Storage) interact with each other before explaining the features |
||
|
||
#### Implementation | ||
|
||
The "Add Member to Group" feature is facilitated by the `Group` class. It provides methods to manage group membership | ||
and allows users to add new members to an existing group. The implementation of this feature is as follows: | ||
|
||
The Group class maintains a list of members as a `private List<User>` field called `members`. | ||
|
||
Users can add a new member to the group by using the command `member USER_NAME`. The `addMember(String memberName)` method is responsible for adding a new member to the group. It performs the following steps: | ||
|
||
1. Checks if a user with the given `memberName` is already a member of the group using the `isMember(String memberName)` | ||
method. | ||
2. If the user is not a member, creates a new `User` object with the provided `memberName`. | ||
3. Adds the new `User` object to the `members` list. | ||
4. Prints a success message indicating that the member has been added to the group. | ||
|
||
![Sequence Diagram](AddMember.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sequence Diagram is well done and formatted nicely! It would be good to show the "isMember( )" method in the sequence diagram as well :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Activation bar of Group should not extend beyond the [else] part of alt frame, as Group is not being used. |
||
### Expenses feature | ||
|
||
#### Implementation | ||
|
||
The Expenses feature is facilitated through the Expense class. It allows users to add a new Expense through creation of | ||
a new Expense object. Users can specify amount paid, the payee, and the members of the group involved in the | ||
transaction. | ||
Additionally, it implements the following operations: | ||
|
||
+ `Expenses#payer()` - Gives the name of the member who paid for the expense | ||
+ `Expenses#totalAmount()` - Returns the total amount of the expense | ||
+ `Expenses#payees()` - Returns all the members involved in the transaction | ||
|
||
These operations are exposed in the Expense class through the `getPayerName()`, `getTotalAmount()`, and `getPayees()` | ||
functions respectively. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The implementation for this feature is clearly stated and easy to follow. Would it be better to also include a sequence diagram to trace the code? |
||
|
||
### Balance feature | ||
|
||
#### Implementation | ||
|
||
The Balance feature is facilitated through the Balance class. | ||
It allows a user to view a printed list of other users in the Group, and the amount that is owed by/to each user. | ||
|
||
Each `Balance` object contains a String of a user `userName`, | ||
and a Map `balanceList`. This Map uses String of other users' usernames as Key, and | ||
a Float of the amount that is owed by/to each user. | ||
|
||
To print a user's Balance List, perform the following steps: | ||
|
||
1. Create a `Balance` object with the params String `userName` and the current Group `group`. | ||
2. From the `members` and `expenseList` List items in `group`, the Map `balanceList` is populated. | ||
3. Call method `printBalance()` to print the contents of the Map `balanceList`. | ||
|
||
### Settle feature | ||
|
||
#### Implementation | ||
|
||
The Settle feature is facilitated through the Settle class. | ||
It allows a user to settle the debts between two users in a Group. | ||
|
||
The `Settle` class contains a `settleDebt(String userName1, String userName2)` method. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice feature! However, the Settle class does not include a settleDebt( ) method that takes in 2 string inputs. It would be helpful to either include this method in the Settle class or clarify where it is implemented. |
||
This method takes in two Strings `userName1` and `userName2` as parameters, representing the two users to settle the | ||
debt between. | ||
|
||
The method then prints out the amount that is owed by `userName1` to `userName2`, and the amount that is owed | ||
by `userName2` to `userName1`. It then prints out the total amount that is owed between the two users, and prompts the user to enter the amount to | ||
settle the debt. | ||
|
||
The method then prints out the amount that is owed by `userName1` to `userName2`, and the amount that is owed | ||
by `userName2` to `userName1` after the settlement. | ||
|
||
## Product scope | ||
|
||
### Target user profile | ||
|
||
{Describe the target user profile} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps can consider removing the prompts for the different sections once you guys have started writing more stuff for that particular section. |
||
Our target users are people who share expenses with friends, family, roommates, or colleagues. | ||
The application gives an accurate and simple way to represent unsettled debts between users and their friends | ||
|
||
### Value proposition | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
|
||
## User Stories | ||
|
||
|Version| As a ... | I want to ... | So that I can ...| | ||
|--------|----------|---------------|------------------| | ||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
| Version | As a ... | I want to ... | So that I can ... | | ||
|---------|----------|----------------------------------------------------------------|-------------------------------------------------------------| | ||
| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application | | ||
| v1.0 | user | add a new expense with description, amount, and users involved | split the expense equally | | ||
| v1.0 | user | create a new group | split expenses with different groups | | ||
| v1.0 | user | list all expenses within a group | see recent transactions | | ||
| v1.0 | user | check how much I owe each member in the group | keep track of my debts | | ||
| v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list | | ||
|
||
## Non-Functional Requirements | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Duke | ||
# Split-liang (An app to help you split expenses with friends in a fun way!) | ||
|
||
{Give product intro here} | ||
|
||
|
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.
Perhaps can also consider having class diagrams, coupled with the suggestion for Architecture Diagram, to provide new developers with a more holistic view of the project