You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DeveloperGuide.adoc
+65-31Lines changed: 65 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,21 +24,20 @@ This document describes the architecture and system design of _PalPay_.
24
24
It is a living document that evolves throughout the design and implementation for each release.
25
25
Each release will have an edition of the document, and the current edition of the document is for the first public release of the application.
26
26
27
-
This document is aimed at covering the high-level system architecture and design.
27
+
This document aims to cover the high-level system architecture and design.
28
28
It is segmented into two major parts: software design, including system architecture, and design implementation.
29
-
The software design documents the main software components that operate and support the main system architecture.
30
-
Essential details such as the user stories and use cases, as well as the Non Functional Requirements are included at the back of the document.
29
+
The software design illustrates the main software components that operate and support the main system architecture.
30
+
Essential details such as the user stories, use cases, and the Non Functional Requirements are included at the back of this document.
31
31
32
32
=== Audience
33
33
34
-
This document is written for software engineers want to gain an insight of the system architecture and design of the application.
35
-
In particular, the intended audience of this document is the students taking the roles of the developers, designers, and software testers of _PalPay_ from CS2103T - Software Engineering.
34
+
This document is written for software engineers who desires a deeper insight of the system architecture and design of this application - PalPay.
35
+
In particular, the intended audience of this document will be the students taking on the roles of the developers, designers, and software testers of _PalPay_ from CS2103T - Software Engineering.
36
36
37
37
=== Description
38
38
39
39
_PalPay_ is a CLI application targeted for users who have poor financial management skills. The users should also prefer typing over mouse inputs.
40
-
It allows the users to keep track of daily financial transactions, as well as set a budget for a time duration to achieve long-term financial success.
41
-
Not only that, users can keep a ledger of lending and borrowing of money with others so that the users can keep track of the flow of their money.
40
+
It allows the users to keep track of daily financial transactions, as well as set a budget for a time duration to achieve long-term financial success. Additionally, users can keep a ledger of lending and borrowing of money with others so that the users can keep track of the flow of their money.
42
41
43
42
== Setting up
44
43
@@ -240,9 +239,9 @@ that deal with `Ledger` implements the `LedgerOperation` interface. +
240
239
** This allows us to achieve polymorphism by overloading methods in `Model` to handle the different operations correctly.
241
240
** This reduces code coupling as there are different models to handle different balance amounts.
242
241
243
-
* A `Transaction` entry can affect a `Budget` which has similar categories.
244
-
** Only `Out` Transactions will affect `Budget`.
245
-
** Activity diagram below shows how and when a `Transaction` object affects `Budget`.
242
+
* A `Transaction` entry can affect a `Budget` which has similar categories and is within the same time period. The activity diagram bellow will further clarify this flow.
243
+
** Only `Out` Transactions can affect `Budget`.
244
+
** The activity diagram below shows how and when a `Transaction` object affects `Budget`.
246
245
247
246
.Activity diagram for Out Transaction affecting Budget
248
247
image::OutbudgetActivityDiagram.png[]
@@ -267,7 +266,13 @@ Upon setting a new budget, a `BudgetCard` is created and displayed in a list in
267
266
268
267
A `Budget` stores an *initial amount*, *amount* (the current amount), *deadline*, *categories*.
269
268
There is a need for a `Budget` to store both *initial amount* and *amount* as it allows for percentage of budget remaining to be calculated. +
270
-
Displaying the percentage improves the user experience greatly as our target user is a
269
+
Shown below is the class diagram of `Budget` class:
270
+
271
+
.Class diagram of Budget class
272
+
image::BudgetClassDiagram.png[]
273
+
274
+
275
+
Displaying the percentage remaining improves the user experience greatly as our target user is a
271
276
`visual person who wants to see how much budget he has left in each category so as to cut down on spending as necessary`
272
277
as specified in <<User-Stories, user stories>>. Hence, taking a quick glance at the `Budget card` allows the user to
273
278
determine how much of budget he has left, as well as be alarmed by the red font colour to spend less if he has overspent beyond the budget set. +
@@ -284,18 +289,26 @@ public String displayPercentage() {
284
289
}
285
290
```
286
291
287
-
Shown below is an example of an overspent budget. Budget is displayed in red to alert the user that
288
-
he has overspent beyond the set budget:
292
+
Moreover, as our user is a visual person, PalPay makes use of colour to display different messages.
293
+
For instance, budget is displayed in red to alert the user that he has overspent beyond the set budget. +
294
+
295
+
Shown below is an example of an overspent budget:
289
296
290
297
.Example of an overspent budget
291
298
image::overspentBudget.png[]
292
299
300
+
293
301
When setting a new `Budget`, existence of a duplicate budget is checked through a sequence of checks.
294
-
The activity diagram below shows a simple successful case of setting a new budget:
302
+
The activity diagram below shows the activity diagram of setting a new budget:
295
303
296
304
.Activity Diagram of successfully setting a new Budget
297
305
image::SetBudgetSimpleActivityDiagram.png[]
298
306
307
+
As shown, a new budget cannot have the same *initalAmount*, *deadline* and *categories* as any other existing budget in
308
+
budget list. Allowing existence of duplicate budgets will crowd the interface of `Budget` tab,
309
+
which prevents the user from getting a quick overview of his budget status. Hence, a duplicate check is essential
310
+
in providing a pleasing user experience. +
311
+
299
312
==== Design Considerations
300
313
301
314
Currently, `Budget` does not extend from `Transaction` although the two behave in a similar way.
@@ -335,6 +348,7 @@ image::Split.png[]
335
348
336
349
// end::split[]
337
350
351
+
//tag::receive[]
338
352
=== Settle Up Feature: `receive`
339
353
340
354
This feature allows another person to send money to the user. +
@@ -371,6 +385,7 @@ public abstract class Payment extends Transaction implements LedgerOperations {
371
385
}
372
386
}
373
387
```
388
+
//end::receive[]
374
389
375
390
// tag::project[]
376
391
[[Implementation-Projection]]
@@ -508,20 +523,20 @@ This feature allows the user to delete an existing transaction, budget, ledger o
508
523
509
524
* The delete feature is facilitated by the Logic and Model components of the application.
510
525
* The delete feature works for `Transaction`, `Budget`, `Ledger` and `Projection` entries.
511
-
* The following activity diagram summarizes what happens when a user executes Delete command:
526
+
* The following activity diagram summarizes what happens when a user executes a `delete` command:
512
527
513
-
.Activity Diagram of Delete Command
528
+
.Activity Diagram for `delete` command
514
529
image::DeleteActivityDiagram.png[]
515
530
516
531
==== Design Consideration
517
532
518
-
* The `delete` command is followed by a `TYPE+INDEX` parameter.
533
+
* The `delete` keyword is followed by a `TYPE+INDEX` parameter.
519
534
** `Transaction` entries takes in `t` as its `TYPE` parameter.
520
535
** `Budget` entries takes in `b` as its `TYPE` parameter.
521
536
** `Ledger` entries takes in `l` as its `TYPE` parameter.
522
537
** `Projection` entries takes in `p` as its `TYPE` parameter.
523
538
* The `index` parameter refers to the entry number within the `TYPE` entry's view tab.
524
-
* Example: `delete t5` deletes the 5th transaction from the list of transaction if that particular entry exists.
539
+
* Example: `delete t5` deletes the 5th entry from the list of transactions if that particular entry exists.
525
540
526
541
===== Aspect: Delete requires `TYPE+INDEX` as one of its parameter
This feature allows users to update `Transaction`, `Budget` or `Projection` entries. The user is unable to perform this feature on `Ledger` and operations the rationale will be further explained in **Aspect 2**.
556
+
This feature currently allows users to update `Transaction`or `Budget` entries. The user is unable to perform this feature on `Ledger` operations. The rationale for this will be further explained in **Aspect 2**. The user is currently unable to perform this feature on `Projection` operations as it will be further implemented in future updates.
542
557
543
558
==== Current Implementation
544
559
545
560
* The update feature is facilitated by the Logic and Model components of the application.
546
561
* The parameter requirements differs for the type of entry:
547
562
** `Transaction` type requires at least one of it's `Amount`, `Description`, `Date` or `Category` fields to be updated.
548
563
** `Budget` type requires at least one of it's `Amount`, `Date` or `Category` fields to be updated.
549
-
** `Project` type only requires it's `Date` field to be updated.
564
+
** `Project` type requires it's `Date` and `Category` fields to be updated (Future implementation).
550
565
* At least one valid parameter must be changed when executing an `update` command. (i.e. `update b1` will result in an error as no fields are being changed).
551
566
* The following activity diagram summarizes what happens when a user executes an update command:
552
567
553
-
.Activity Diagram for update
568
+
.Activity Diagram for `update`
554
569
image::UpdateActivityDiagram.png[]
555
570
556
571
==== Design Considerations
@@ -573,13 +588,23 @@ More often than not, users do not need to change an entire Transaction or Budget
573
588
574
589
* **Alternative 1 (current choice):** Update Command only works with `Transaction`, `Budget` and `Projection` Operations.
575
590
** Pros: Intuitive implementation and execution for the user.
576
-
** Cons: Requires excessive user operations. The user has to first delete the `Ledger` operation that he/she wishes to change, then input the `Ledger` operation with the amended fields.
577
-
** For example, when a new command is executed, we must remember to update both `HistoryManager` and `VersionedAddressBook`.
591
+
** Cons: Requires excessive user operations.
592
+
*** The user has to first delete the `Ledger` operation that he/she wishes to change, followed by inputting the `Ledger` operation with the amended fields back into PalPay.
578
593
* **Alternative 2:** Update Command to also work with `Ledger` operations.
579
594
** Pros: Requires only one user command to append or change `Ledger` entries.
580
595
** Cons: Results in convoluted implementation and user experience. This will also hinder future permeability of the `Split` feature.
581
596
*** `Ledger` operations such as `split` includes many repeated fields (i.e. multiple `Persons` and `shares` list).
582
597
*** Will require several conditional user inputs to differentiate between the various repeated entities that the user wishes to amend.
598
+
599
+
==== Future Enhancements
600
+
601
+
===== Update feature for Projections
602
+
Currently the update feature has not been implemented for `Projection` operations. In future iterations of PalPay, the update feature should work seamlessly with `Projection` operations, similar to that of `Transaction` and `Budget` operations
603
+
604
+
The activity diagram below will provide a visual representation of the possible user routes using the `update` command after this enhancement has been implemented.
605
+
606
+
.Activity Diagram for future `update`
607
+
image::UpdatefutureActivityDiagram.png[]
583
608
// end::update[]
584
609
585
610
// tag::sort[]
@@ -724,20 +749,20 @@ Given below is an example usage scenario and how the undo/redo mechanism behaves
724
749
The `VersionedUserState` will be initialized with the initial user state, and the `currentStatePointer`
0 commit comments