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

[CS2113T-T13-2] Nuke #16

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

Conversation

A11riseforme
Copy link

No description provided.

@A11riseforme
Copy link
Author

damithc pushed a commit to damithc/tp-draft that referenced this pull request Mar 14, 2020
…branch-Joseph

merge fixed command parser
Copy link

@NyanWunPaing NyanWunPaing left a comment

Choose a reason for hiding this comment

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

Very neat UML diagram. Good job guys!


{Describe the target user profile}
By: `CS2113T-T13-2` Since: `Feb 2020`
<small>[Go to Webpage](https://ay1920s2-cs2113t-t13-2.github.io/tp/DeveloperGuide.html)</small>

Choose a reason for hiding this comment

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

Good use of links to navigate through the link


Below are the class-diagram for the involved classes:

![image-20200326014336120](images/Add_Module_Command_Class_Diagram.png)

Choose a reason for hiding this comment

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

The team have clear and useful class diagram, you may add an interface class for Command class.

3. There are **multiple** matches -- The list of matches will be shown to the user, and the user chooses which ones to delete. A further prompt will be given to confirm the deletion(s).

#### Feature Implementation
![Delete Command Class Diagram](images/Delete_Command_Class_Diagram.png)

Choose a reason for hiding this comment

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

I think in my opinion, there are too many detail in one diagram. I suggest we can keep it simple how it is shown in Add :)

Choose a reason for hiding this comment

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

I agree. maybe it could be cleaned up by removing unimportant attributes in the leaf classes

Lastly, the `FilterCommand` class extends the abstract `Command` class that contains the `execute()` method to execute the actual **delete** command.
<br>

![Prompt Command Class Diagram](images/Prompt_Class_Diagram.png)

Choose a reason for hiding this comment

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

YES this is perfect amount of information! Clear and minimalist but still provide enough information for the reader to understand the class diagram


Below is a *sequence diagram* to illustrate the above example scenario.

![Delete Command Sequence Diagram](images/Delete_Command_Sequence_Diagram.png)

Choose a reason for hiding this comment

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

There is a sequence diagram. 😄
However are are a few improvement that I can find:

  1. PrepareDeleteTaskCommand is not needed,
  2. createFilterTaskList() instead of just createFilterTaskList
  3. The return arrow if there is no object to return, there is no need for them to label them.

Other then these type of error there is nothing wrong with the sequence diagram !!
Great use of Sequence diagram to explain how delete function works. Provide enough information
not too much and not too less to the reader to understand the flow of the sequence.
Good job 👍

2. James receive the following feedback:

```
root :

Choose a reason for hiding this comment

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

I think that a picture would be better as it show what the actual output should look like 🤔

4 | CS3235 | Computer Security
+--------------------------------------------------------------------------------------------------+
Total modules: 4
+--------------------------------------------------------------------------------------------------+

Choose a reason for hiding this comment

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

The diagram is useful and help the reader understand the output better

Below is a *sequence diagram* to illustrate the above example scenario.

```
to-do: add the sequence diagram

Choose a reason for hiding this comment

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

Yes please add more sequence diagram to aid the reader understand the feature more 👍

Below is a *sequence diagram* to illustrate the above example scenario.

![Delete Command Sequence Diagram](images/Delete_Command_Sequence_Diagram.png)
<span style="color: green"><small><i>Figure <b>Delete Command Sequence Diagram</b></i></small></span>

Choose a reason for hiding this comment

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

I am not sure but I think line crossing through parser eg in sequence diagram 2 is not allowed ? 🤔

Copy link

@quinnyyy quinnyyy left a comment

Choose a reason for hiding this comment

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

Great work overall. I think that there are a few improvements that can be made but overall it was easy to understand

1. `DuplicateModuleException` will be thrown if the module specified by the user is contained in the `ArrayList` named `moduleList` in `ModuleManager` class.
2. `ModuleNotProvidedException` will be thrown if the module code specified by the user is not contained in the `HashMap` named `modulesMap` in `ModuleManager` class.

Below are the class-diagram for the involved classes:

Choose a reason for hiding this comment

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

Could it make sense to add the interaction with ModuleManager to this class diagram?




#### 1.2. Add Category and Task Features

Choose a reason for hiding this comment

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

Maybe can add some more visuals to this section? It was a bit hard for me to follow just reading along

3. There are **multiple** matches -- The list of matches will be shown to the user, and the user chooses which ones to delete. A further prompt will be given to confirm the deletion(s).

#### Feature Implementation
![Delete Command Class Diagram](images/Delete_Command_Class_Diagram.png)

Choose a reason for hiding this comment

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

I agree. maybe it could be cleaned up by removing unimportant attributes in the leaf classes

Refer to the guide [here](#) to set up.

<br>

Choose a reason for hiding this comment

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

Maybe adding a high level architecture view at the beginning would be helpful. I think it would've made it easier for me to read the implementation stuff if I had some more context

Choose a reason for hiding this comment

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

i know the developer guide is unfinished but just to keep in mind


<br>

Below is a *sequence diagram* to illustrate the above example scenario.

Choose a reason for hiding this comment

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

I think the annotations between the sequence diagram and the above example were really well done. It made a complex sequence diagram easy to follow

Copy link

@yuchenlichuck yuchenlichuck left a comment

Choose a reason for hiding this comment

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

Good Code~ You really have written a lot of things and it's very completed. Best Regards

package seedu.nuke.command;

public abstract class Command {
// public static String COMMAND_WORD;

Choose a reason for hiding this comment

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

If it's unnecessary, it may need to be deleted after

*
* @see Command
*/
public abstract class AddCommand extends Command {

Choose a reason for hiding this comment

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

Hi there, I see in the figure, there is a

getParentDictionary.

But I haven't seen it in the code..
image

* @see Command
* @see Module
*/
public class AddModuleCommand extends AddCommand {

Choose a reason for hiding this comment

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

There is also without getParentDictionary()
image

}
}

protected ArrayList<Directory> createFilteredFileList(String moduleKeyword, String categoryKeyword,

Choose a reason for hiding this comment

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

Haven't been written in the Class diagram

image

}
}

private ArrayList<Directory> filterModules(String moduleKeyword, boolean isExact) {

Choose a reason for hiding this comment

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

Is it not important so it wasn't written in the diagrams?
image

* @see Command
* @see TaskFile
*/
public class DeleteFileCommand extends DeleteCommand {

Choose a reason for hiding this comment

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

Haven't been written in the class diagram.. is it not vital?
image

* @throws IncorrectDirectoryLevelException
* If there is illegal access to a directory
*/
private boolean isCurrentDirectoryInList(ArrayList<Directory> filteredList)

Choose a reason for hiding this comment

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

image
Haven't been written in the code. Is it not correct?

Copy link

@DDzuikeai DDzuikeai left a comment

Choose a reason for hiding this comment

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

Really good work! Keep on working and don't forget to add more diagrams!


<br>

Below is a *sequence diagram* to illustrate the above example scenario.

Choose a reason for hiding this comment

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

I think the sequence diagram is really detailed and makes the above scenarios easier to understand.
But would it be better to place each picture together with its related senario? It's easier for reader to follow and understand.


Below is a *sequence diagram* to illustrate the above example scenario.

![Delete Command Sequence Diagram](images/Delete_Command_Sequence_Diagram.png)

Choose a reason for hiding this comment

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

Here are some suggestions based on my understanding:

    1. Method calls should have a (), for example use executeInitialDelete() instead of executeInitialDelete
    1. Maybe it's better to add constuct method on the arrow representing the call to the constructor.

1. enter `cd cs3235` to enter the module directory then enter `addc misc` to add the category.
2. enter `addc misc -m cs3235` to add the category at the root directory.

Suppose James use the first method, after the second input, the input is parsed as an **add task** command and executed, the `AddCategoryCommand#execute()` will call ``AddCategoryCommand#getParentDirectory()` to get the current parent directory, then it will instantiate an `Category` object with the name "misc". After which `CategoryManager#add()` will be called to add the new object. In the `CategoryManager#add()` method, it will call `CategoryManager#contains()` method to check if the current parent directory contains the category with name "misc", finally add the object into the `ArrayList` of `categoryList`.

Choose a reason for hiding this comment

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

Seems that you accidentally typed an extra symbol so the format of this paragraph is incorrect

``AddCategoryCommand#getParentDirectory()`

Below are the class-diagram for the involved classes:

```
to-do: add the class-diagram

Choose a reason for hiding this comment

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

The description is quite clear but I still feel a bit hard to follow without a diagram.
Look forward to a detailed diagram!

2. The name of the specified category/task already exist. -- No category/task will be added.
3. The specified upper parent directory exist and the name of the specified category/task does not exist. -- The specified category/task will be added.

#### Feature Implementation

Choose a reason for hiding this comment

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

The implementation is quite clear, but have you considered alternative ways to implement this feature?
I think it would be better to make a comparison between your current choice and alternatives you may have considered.
So it's more clear to see pros and cons of your current choice.


<br>

## **Design**

Choose a reason for hiding this comment

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

I think a Architecture Diagram can be provided here. So it's easier to understand the main workflow and how components interact with each other.

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.

7 participants