-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update DG with implementation details for loan view GUI #77
Update DG with implementation details for loan view GUI #77
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #77 +/- ##
=========================================
Coverage 59.43% 59.43%
Complexity 442 442
=========================================
Files 85 85
Lines 1817 1817
Branches 178 178
=========================================
Hits 1080 1080
Misses 692 692
Partials 45 45 ☔ View full report in Codecov by Sentry. |
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.
Overall this looks good to me.
@@ -302,10 +302,12 @@ _{more aspects and alternatives to be added} | |||
### Loan Analytics - Joseph | |||
|
|||
#### Implementation | |||
|
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.
Good adherence to checkstyle.
|
||
#### Design Considerations | ||
|
||
##### Aspect: How the GUI is updated |
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.
Good consideration of implementation.
|
||
### Loan view GUI - Kyal Sin Min Thet | ||
|
||
#### Implementation |
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.
Clear description of implementation.
* Pros: Follows the observer design pattern, reducing coupling between the `Model` and `MainWindow` components. | ||
* Cons: The GUI updates are restricted to the observable properties of the `Model` component. | ||
|
||
* **Alternative 2:** The GUI updates are done by the `MainWindow` component. |
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.
Realistic alternative considered
@@ -402,6 +444,7 @@ Sequence diagram for the deletion of a loan: | |||
**Target user profile**: | |||
|
|||
The target user is businessman who satisfies the following criteria | |||
|
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.
Good adherance to checkstyle
* **Alternative 2:** The GUI updates are done by the `MainWindow` component. | ||
* Pros: More explicit control over the GUI updates. | ||
* Cons: `Model` needs a reference to `MainWindow` to update the GUI directly. This increases coupling between the | ||
components. |
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.
Careful analysis of pros and cons, good!
* **Non-Functional Requirements**: A requirement that specifies criteria that can be used to judge the operation of | ||
a system, rather than specific behaviours. | ||
* **Non-Functional Requirements**: A requirement that specifies criteria that can be used to judge the operation of | ||
a system, rather than specific behaviours. | ||
* **Mainstream OS**: Windows, Linux, Unix, or MacOS | ||
|
||
-------------------------------------------------------------------------------------------------------------------- |
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.
lgtm
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.
LGTM!
##### Aspect: Initialization of the Analytics object: | ||
|
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.
I like how you left blank lines to increase clarity and structure of the file!
@@ -347,13 +351,14 @@ parsed and transformed into an appropriate format. | |||
The parsing of the command is done by the `DeleteLoanCommandParser` class, which is responsible for parsing the user | |||
input. | |||
|
|||
The `DeleteLoanCommand` class is instantiated in the `DeleteLoanCommandParser` class, while the | |||
The `DeleteLoanCommand` class is instantiated in the `DeleteLoanCommandParser` class, while the |
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.
Nice catch on the removed whitespace!
* **Alternative 1 (current choice):** The `DeleteLoanCommand` class is responsible for executing the command only. | ||
* Pros: Follows the Single Responsibility Principle. Simpler to debug. | ||
* Cons: May result in more classes. | ||
* **Alternative 2:** The `LogicManager` class is responsible for executing the command. | ||
* Pros: More centralized command execution. | ||
* Cons: May result in the `LogicManager` class becoming too large. This also goes against various SWE principles, | ||
and makes the code harder to maintain. | ||
and makes the code harder to maintain. |
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.
Again, good effort to standardise the formatting!
contact. It generates new `LoanCard` objects according to the `loanList` in the `Model` class. | ||
To accommodate the new GUI component, the `MainWindow.java` file is updated to include the new `LoanListPanel`. | ||
|
||
To ensure that only either the loan list or the person list is displayed, an additional `BooleanProperty` is added to |
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.
Nice explanation of why the BooleanProperty
is abstracted out!
the `Model` | ||
component to act as a flag to indicate which list is currently being displayed. This flag is updated by corresponding | ||
commands. | ||
For instance, commands such as `list` will toggle the flag to false, while `viewloan` will toggle the flag to true. |
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.
Clear and concise examples of what will cause the flag to toggle, well done!
No description provided.