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

Update DG with implementation details for loan view GUI #77

Conversation

marcus-ny
Copy link

No description provided.

@marcus-ny marcus-ny added the priority.High Must do label Mar 27, 2024
@marcus-ny marcus-ny added this to the v1.3 milestone Mar 27, 2024
@marcus-ny marcus-ny self-assigned this Mar 27, 2024
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.43%. Comparing base (f62b13f) to head (5f52634).

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.
📢 Have feedback on the report? Share it here.

Copy link

@Joseph31416 Joseph31416 left a 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

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

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

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.

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

Copy link

@xiaorui-ui xiaorui-ui Mar 27, 2024

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.

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

--------------------------------------------------------------------------------------------------------------------

Choose a reason for hiding this comment

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

lgtm

Copy link

@kjw142857 kjw142857 left a 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:

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

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.

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

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.

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!

@kjw142857 kjw142857 merged commit a84d7c7 into AY2324S2-CS2103T-W13-1:master Mar 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants