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

[CS2113-W14-2] PlanPal #27

Open
wants to merge 514 commits into
base: master
Choose a base branch
from

Conversation

C2linaung
Copy link

International students may struggle with coping to their new environment. This CLI-based personal assistant tool helps them to integrate to their new environment by giving them a way to quickly access and retrieve vital information.

@C2linaung C2linaung closed this Sep 30, 2024
@C2linaung C2linaung reopened this Sep 30, 2024
Copy link

@tzerbin tzerbin left a comment

Choose a reason for hiding this comment

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

Relatively clean code!
Just some small issues here and there in the code base :)

* @return true if continue to handle category commands. Otherwise, false.
*/
public boolean handleCategory(String description) {
try {
Copy link

Choose a reason for hiding this comment

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

Perhaps shorten this method using guard clause instead.

* @param description The description of the command
* @return true if continue to handle category commands. Otherwise, false.
*/
public boolean handleCategory(String description) {
Copy link

Choose a reason for hiding this comment

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

Would prefer to use exception handling / assertions / guard clauses to deal with checking the functionality is successful, instead of using boolean return type.

*
* @param description The category to be found
*/
public void searchCategory(String description) {
Copy link

Choose a reason for hiding this comment

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

The naming of the method may mislead people that it will return some information.

* @param list The list of items to search in. This should not be null.
* @param query The query string containing one or more keywords to search for. This should not be null.
*/
default <T> void findInList(ArrayList<T> list, String query) throws PlanPalExceptions {
Copy link

Choose a reason for hiding this comment

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

Similar to previous issue; method name may mislead readers to expect something to be returned.

description = inputParts[1].trim();
contactManager.addContact(description);
return true;
// fallthrough
Copy link

Choose a reason for hiding this comment

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

Inconsistent usage of comment.
The purpose of fallthrough is to ensure coders that they know code from previous switch cases are continued in the current case.
Since the return keyword is used, there is no need for fallthrough comments.

fileManager.loadList(contactManager, "contacts.txt");

while (isProcessing) {

Copy link

Choose a reason for hiding this comment

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

Excess usage of newlines here.

break;

case EXPENSE_MANAGER:
// do something
Copy link

Choose a reason for hiding this comment

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

Redundant comments.

Choose a reason for hiding this comment

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

Should the self call arrow for the editList() method of :ContactManager be pointing to the top of the activation bar instead


The **Architecture Diagram** given above explains the high-level design of the program. Given below is a quick overview of the main components.

### Main Components

Choose a reason for hiding this comment

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

You can consider doing other UML diagrams for these components either Class / Object diagrams

Choose a reason for hiding this comment

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

This diagram looks good just that the resolution is not to great. You could also consider abstracting the opt block with a ref


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)

Choose a reason for hiding this comment

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

It would be good to add an explanation for the Edit and Set Category command like you guys did in the List Command

Copy link

@yeekian yeekian left a comment

Choose a reason for hiding this comment

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

Good start to the DG! I am sure with some improvements up to the deadline, your team will be able to create an excellent final product and DG. All the best!

Welcome to the PlanPal Developer Guide! Thank you for taking an interest in the behind-the-scenes work of our product. We hope this document proves informative and useful for your work!

## Table of Contents
{to be inserted at a later date}
Copy link

Choose a reason for hiding this comment

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

Good that you are inserting a table of contents, hope that you get it up soon!

## Acknowledgements


{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
Copy link

Choose a reason for hiding this comment

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

I understand that this is for planning purposes, but this can be removed once information has been added to the DG

- `UI`: In charge of printing messages
- `Logic`: Determines the command to execute
- `Storage`: Read and write data from hard disk
- `Command`: Specific commands for execution
Copy link

Choose a reason for hiding this comment

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

Agree with the previous commenter that diagrams would be good to explain the components

Copy link

Choose a reason for hiding this comment

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

Instead of writing return as a return object, it would be good to be more specific as to what is actually being returned, i.e. return object

Copy link

Choose a reason for hiding this comment

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

The use of color to indicate which components the entities are from would also be helpful for sequence diagrams in this DG.

Copy link

Choose a reason for hiding this comment

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

Nice use of colors, forming a colorful diagram. As other sequence diagrams are with white background, it would be good to have a consistent background color.

Copy link

Choose a reason for hiding this comment

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

Same comment as previous, on being more specific on what is being returned from each activation bar.

Copy link

Choose a reason for hiding this comment

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

Same comment as previous, on being more specific on what is being returned from each activation bar.

Copy link

@nirala-ts nirala-ts left a comment

Choose a reason for hiding this comment

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

Overall, I see that your DG is well-formatted and easy to understand.

|v1.0|NUS international student| delete a contact | remove a contact if I no longer need it |
|v1.0|NUS international student| edit a contact | amend any mistakes when creating the contact or if the number has been changed |
|v1.0|NUS international student| save my contacts | my contacts are still there when I exit and enter the app again | |
|v2.0|| | |

Choose a reason for hiding this comment

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

Should there be a 6th user story? I see that you have the version component filled but there rest of the user story (user type, action and purpose) is empty.

docs/DeveloperGuide.md Show resolved Hide resolved

### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)

Choose a reason for hiding this comment

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

Should your alt diagram have a else case? Your alternative path has missing "else" case.

Screenshot 2024-10-30 at 10 39 54 AM


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)

Choose a reason for hiding this comment

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

Does your alt diagram follow the format outlined in the professor’s notes? Does it include the operation arrows and activation bars for the if-else components?

Screenshot 2024-10-30 at 10 41 38 AM


### Edit Command
The sequence diagram below illustrates the process for resolving the "edit" command.
![EditContact.drawio.png](Images%2FEditContact.drawio.png)

Choose a reason for hiding this comment

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

There is inconsistent diagram backgrounds: this diagram has a black background, while the others use white.

Copy link

Choose a reason for hiding this comment

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

To add on to the inconsistency, should there be a standardisation for all the diagrams? In this case, should the object be only on the top, or should it be both on the top and bottom?
This case:
image

Most others:
image


### List Command
The sequence diagram below illustrates the process for resolving the "list" command.

Choose a reason for hiding this comment

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

Your self-invocation arrows in List Command feature sequence diagram do not align with the professor's notation. The bottom part of the arrow should be slanted.

Screenshot 2024-10-30 at 1 48 28 PM


### Edit Command
The sequence diagram below illustrates the process for resolving the "edit" command.
![EditContact.drawio.png](Images%2FEditContact.drawio.png)

Choose a reason for hiding this comment

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

Your self-invocation arrows in Edit Command feature sequence diagram do not align with the professor's notation. The bottom part of the arrow should be slanted.

Screenshot 2024-10-30 at 1 48 28 PM


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)

Choose a reason for hiding this comment

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

Your self-invocation arrows in Set Category Command feature sequence diagram do not align with the professor's notation. The bottom part of the arrow should be slanted.

Screenshot 2024-10-30 at 1 48 28 PM


### Edit Command
The sequence diagram below illustrates the process for resolving the "edit" command.
![EditContact.drawio.png](Images%2FEditContact.drawio.png)

Choose a reason for hiding this comment

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

This section has missing explanation on how the Edit Command works. Would adding an explanation section be useful or is the sequence diagram enough?


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)

Choose a reason for hiding this comment

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

This section has missing explanation on how the Set Category Command works. Would adding an explanation section be useful or is the sequence diagram enough?

Copy link

@NCF3535 NCF3535 left a comment

Choose a reason for hiding this comment

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

Overall the Developer Guide is good. Do note of the consistency issues and try to add class diagrams as well, not just sequence and architecture diagrams.


### Add Command
The sequence diagram below illustrates the process for resolving the "add" command.
![AddContact.drawio.png](Images%2FAddContact.drawio.png)
Copy link

Choose a reason for hiding this comment

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

Should there be more context for the return? Should it be blank if it is returning void?
image


### Edit Command
The sequence diagram below illustrates the process for resolving the "edit" command.
![EditContact.drawio.png](Images%2FEditContact.drawio.png)
Copy link

Choose a reason for hiding this comment

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

To add on to the inconsistency, should there be a standardisation for all the diagrams? In this case, should the object be only on the top, or should it be both on the top and bottom?
This case:
image

Most others:
image


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)
Copy link

Choose a reason for hiding this comment

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

Is there a need to put return ? Should just putting inCategory , true or false be enough to reduce clutter?
image

- `Storage`: Read and write data from hard disk
- `Command`: Specific commands for execution

### Program Flow
Copy link

Choose a reason for hiding this comment

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

Should there be state diagrams to better represent the flow? Should flow be more of 1. 2. 3. rather than point form bullet points?


### Set Category Command
The sequence diagram below illustrates the process for resolving the "category" command.
![SetCategory.drawio.png](Images%2FSetCategory.drawio.png)
Copy link

Choose a reason for hiding this comment

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

Should there be visualization of user just like the add command?
Set Category:
image

Add:
image


Currently, only the contact features have been illustrated.
Copy link

Choose a reason for hiding this comment

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

Should there be a diagram to explain or show the interactions or differences between Contact Manager and Expense Manager?


### Add Command
The sequence diagram below illustrates the process for resolving the "add" command.
![AddContact.drawio.png](Images%2FAddContact.drawio.png)
Copy link

Choose a reason for hiding this comment

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

Should the font size of the words in the sequence diagram be consistent with the DG as mentioned in the lecture notes?
image

Copy link

@tzerbin tzerbin left a comment

Choose a reason for hiding this comment

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

A very good effort in drafting your DG!
Small issues here and there and do work on all the reviews by your peers.

## Mode: Contact Manager
The class diagram below represents the contact book system

<u>Class Diagram for Contact Manager</u>
Copy link

Choose a reason for hiding this comment

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

Is there a reason why different class diagrams look like they are generated from different software?

Also, do have the association labels, roles, and multiplicities.

Otherwise, actually a pretty good class diagram that shows the overview of the ContactManager!

docs/DeveloperGuide.md Outdated Show resolved Hide resolved
docs/DeveloperGuide.md Show resolved Hide resolved
docs/DeveloperGuide.md Outdated Show resolved Hide resolved
anlamm and others added 30 commits November 12, 2024 08:50
recurring is debugged to work for current month if current month is new
fix bugs and complete PPP
update UG to provide more information about loading category data and…
test cases added for restore and backup functions
Add PPP link and made other formatting changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants