Skip to content

[CS2113T-T09-4] CLICK#26

Open
nvbinh15 wants to merge 804 commits intonus-cs2113-AY2122S1:masterfrom
AY2122S1-CS2113T-T09-4:master
Open

[CS2113T-T09-4] CLICK#26
nvbinh15 wants to merge 804 commits intonus-cs2113-AY2122S1:masterfrom
AY2122S1-CS2113T-T09-4:master

Conversation

@nvbinh15
Copy link
Copy Markdown

CLICK is a desktop app for managing modules, lifestyle, schedule, and CAP planning, optimized for use via a Command Line Interface (CLI).

Comment thread docs/DeveloperGuide.md Outdated

After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Should this arrow for execute() start before the activation bar ends?

Comment thread docs/DeveloperGuide.md Outdated
in the directory `fooddata` , with the text file named aptly as `food.txt`. Current improvements in this functionality
would be to integrate the dates in `Calendar` with the `food.txt` file, enabling the user to search what they ate on a
given day.
![](./images/food/food_architecture.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Is "Food Record" a method call? Should that arrow be starting before the activation bar ends?

Comment thread docs/DeveloperGuide.md Outdated
in the directory `fooddata` , with the text file named aptly as `food.txt`. Current improvements in this functionality
would be to integrate the dates in `Calendar` with the `food.txt` file, enabling the user to search what they ate on a
given day.
![](./images/food/food_architecture.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Should "Food Record" start a new activation bar in AddFoodCommand? Should the activation for the AddFoodCommand be separated into multiple activation bars?

Comment thread docs/DeveloperGuide.md Outdated

The sequence diagram below summarizes how listing modules work:

![](images/module/ListModule.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Should there also be a condition specified for the second alt block, e.g. [else]?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Can indicate the return type for clarity instead of just "moduleList".

Comment thread docs/DeveloperGuide.md Outdated
The saving of data from the list to the storage file is elaborated further in the diagram below.
Further discussion on the design considerations of writing an abstract class are discussed in
design considerations.
![](./images/food/foodClassDiagram.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Should there be a colon between isSilent and boolean?

Comment thread docs/DeveloperGuide.md Outdated
The saving of data from the list to the storage file is elaborated further in the diagram below.
Further discussion on the design considerations of writing an abstract class are discussed in
design considerations.
![](./images/food/foodClassDiagram.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Is the "C" icon standard notation?

Comment thread docs/DeveloperGuide.md Outdated

The following diagram illustrates the interactions between the functional class `ClassPackageReader` and
a particular command `ClickCommand`.
![](./images/help/helpCommandsClassDiagram.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Similar issue as before, is the "C" icon standard notation?

Comment thread docs/DeveloperGuide.md Outdated
| \ | Alternative 1 (current choice): Reads the name and syntax from the Classes | Alternative 2 (previous choice): Prints all available commands from a String, hard-coding every syntax and printing |
|---|---|---|
| Pros | 1. Dynamic, works well and sorts the names by order as long as the constructor is included for a command<br>2. Very readable and testable due to sorted names<br>3. OOP implementation with overloaded methods and branching on inheritance<br>4. The user gets to easily view *ALL* possible commands with a single word | 1. Easy to implement, just adding all available commands into a String and print it out<br>2. Relatively fewer lines of code (LoC)<br>3. User gets specific syntax with command entered |
| Cons | 1. Possible depreciated methods (`Class.getMethod`, `Class.getDeclaredConstructor`) which may be outdated, however,<br> are still functional<br>2. Many more lines of code (LoC) for implementation <br>3. The user is bombarded with *ALL* possible commands with a single word | 1. Hard-coding and sorting help commands manually is a chore<br>2. User still has to remember the command in order to access the syntax |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

designConsiderationsHelpCommand

Comment thread docs/DeveloperGuide.md Outdated

After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

helpCommandDescription

Comment thread docs/DeveloperGuide.md Outdated

After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

helpCommandSequence

Comment thread docs/DeveloperGuide.md Outdated
> **NOTE:** Two tasks and two lectures are displayed for each day based on the order in which the user added them, and if there are more, they will show as and when the user deletes the tasks/lectures that are currently displayed.

The below sequence diagram shows the execution process of the calendar display feature.
![](./images/calendar/CalendarDisplaySequence.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

calendarDisplay1

Comment thread docs/DeveloperGuide.md Outdated
> **NOTE:** Two tasks and two lectures are displayed for each day based on the order in which the user added them, and if there are more, they will show as and when the user deletes the tasks/lectures that are currently displayed.

The below sequence diagram shows the execution process of the calendar display feature.
![](./images/calendar/CalendarDisplaySequence.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

calendarDisplay2

Comment thread docs/DeveloperGuide.md Outdated
1. if command, go ahead and execute it respectively
1. if not throw exception and ask for input again
1. Parser returns control to Click
![](./images/ClickRun.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

commandCall

Comment thread docs/DeveloperGuide.md Outdated
The saving of data from the list to the storage file is elaborated further in the diagram below.
Further discussion on the design considerations of writing an abstract class are discussed in
design considerations.
![](./images/food/foodClassDiagram.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

foodDiag

Copy link
Copy Markdown

@uosjapuelks uosjapuelks left a comment

Choose a reason for hiding this comment

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

minor errors.

Comment thread docs/DeveloperGuide.md
1. Parser returns control to Click
![](./images/ClickRun.png)

You should note that this is a general overview of the Click functionality, and the `:Command` entity simply represents a Command to be called by the Parser.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With reference to the screenshot posted by giterator, your Click calls the command instead of your Parser.

Comment thread docs/DeveloperGuide.md
ii. `AddModuleCommand` calls `getModule()` to create a new `module` based on user's input.\
iii. `AddModuleCommand` calls `storage.StorageModule.readDataFromFile()` to read Module-related data `moduleList` from the storage file.\
iv. `AddModuleCommand` calls `moduleList.addModule(module)` to add a new `module` to the list.\
v. `AddModuleCommand` prompts the successful message to the user.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

You forgot to add a slash at the end this time so there's no new line.

Comment thread docs/DeveloperGuide.md Outdated
ii. `DeleteModuleCommand` finds the `moduleIndex` based on user's input.\
iii. `DeleteModuleCommand` checks if `moduleIndex` is valid or not. If not, throw an `IllegalModuleIndexException`.\
iv. `DeleteModuleCommand` calls `moduleList.addModule(module)` to add a new `module` to the list.\
v. `DeleteModuleCommand` prompts the successful message to the user.\
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image
You may not have intended to print successful message after adding a new module in "Delete" command.

Comment thread docs/DeveloperGuide.md

ii. The `inputYearMonth` is passed into `Ui` class method `printCalenderTitle` and this prints out the title of that month with the month name and the year. In this example, it will display as given in the figure below.
![](./images/calendar/calendar_header.png)
iii. Then, the method `arrangeTaskList` in `Schedule` class is called, and it takes in `storage.tasksList` (the TaskList object with all the currently stored tasks drawn from storage), `calendarTasks` (an ArrayList<ArrayList<String>> object initialized with empty ArrayLists of type String), `month` (the month input by the user, which in this example is the integer `10`) and year `month` (the year input by the user, which in this example is the integer `2021`), and adds the tasks to the days in the empty String ArrayLists initialized before in `calendarTasks`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image
Almost thought point iii. disappeared into thin air. Do take note it appeared behind your screenshot.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding on to this, you can consider using markdown numbered lists.

Comment thread docs/DeveloperGuide.md
1. if not throw exception and ask for input again
1. Parser returns control to Click
![](./images/ClickRun.png)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Shouldn't methods include () behind the method?

Comment thread docs/DeveloperGuide.md

Syntax: `zoom add LINK MODULE_CODE`
Example: `zoom add nus.sg/testlink ABC101`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can consider adding sequence diagrams, or more detailed explanation on how the zoom links are stored.

Comment thread docs/DeveloperGuide.md

ii. The `inputYearMonth` is passed into `Ui` class method `printCalenderTitle` and this prints out the title of that month with the month name and the year. In this example, it will display as given in the figure below.
![](./images/calendar/calendar_header.png)
iii. Then, the method `arrangeTaskList` in `Schedule` class is called, and it takes in `storage.tasksList` (the TaskList object with all the currently stored tasks drawn from storage), `calendarTasks` (an ArrayList<ArrayList<String>> object initialized with empty ArrayLists of type String), `month` (the month input by the user, which in this example is the integer `10`) and year `month` (the year input by the user, which in this example is the integer `2021`), and adds the tasks to the days in the empty String ArrayLists initialized before in `calendarTasks`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding on to this, you can consider using markdown numbered lists.

Comment thread docs/DeveloperGuide.md
After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
The sequence diagram provides a high-level view on how the entities interact. You should notice the interaction between
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image
Is help a method parameter? If so, you should include the method as well

Comment thread docs/DeveloperGuide.md Outdated

After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image
Is "static" correct convention? I believe you should use "class" when calling static methods.

Comment thread docs/DeveloperGuide.md Outdated

## 3. Design

This section is designed to demonstrate our software design description, and aims to provide you with an overall guidance to the architecture of Duke.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should it be "architecture of Click" instead?

Comment thread docs/DeveloperGuide.md Outdated
1. if command, go ahead and execute it respectively
1. if not throw exception and ask for input again
1. Parser returns control to Click
![](./images/ClickRun.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

splitCommandAndArgs method call should have an activation bar

Comment thread docs/DeveloperGuide.md Outdated
1. if command, go ahead and execute it respectively
1. if not throw exception and ask for input again
1. Parser returns control to Click
![](./images/ClickRun.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Should the execute() call directly into the activation bar of the Command constructor? shouldn't the constructor return the Object first, then execute called with its own activation bar?

Comment thread docs/DeveloperGuide.md Outdated

**_Welcome to Click_!** It's a Java-based Command-Line Interface for Cramming and Knowledge (CLICK), providing a one-stop access point
for managing various parts of your Computing student life here at NUS. We aim to provide a simple interface
that quantifies how you use your time and if you're taking care of your overall well-being.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think a brief overview of the application's capabilities and functionalities would be beneficial to understanding the rest of the DG easier.

Comment thread docs/DeveloperGuide.md Outdated

The command for listing all modules is implemented by the `AddModuleCommand` class that extends `Command`.

When the user types `module add c/CS2113T n/Software Engineering e/A`, the following sequence of steps will then occur:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For this and the other implementation sections, it would be good to explain what the different flags represent. Otherwise it's a bit hard to follow

Comment thread docs/DeveloperGuide.md Outdated

The command for displaying the calendar for a specific month is implemented by the `DisplayCommand` class that extends `Command`.

Given below is an example usage scenario and how the display calendar mechanism behaves at each step.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This whole section is quite wordy with long paragraphs. It's quite hard to read and follow.

Maybe putting the Sequence diagram at the front, then explaining the diagram might be clearer

Comment thread docs/DeveloperGuide.md Outdated

After describing the [architecture](#461-architecture--of-help-command) of the help command, this portion will then describe the sequence of activation by
the user when parsing a `help` command. Take the following sequence diagram for reference.
![](./images/help/HelpCommand_execute-Help_Commands.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Shouldn't the activation bar for the parser call extend all the way until the help message is printed?

Activation bars for Help command should be split up by the method calls. As it is now, it seems to imply that all the method calls occur in the constructor.

Comment thread docs/team/DG_binh.md Outdated

If the creation is successful, a confirmation message on the newly created Module will be displayed to the user.

**Implementation**
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can consider using UML diagram to illustrate this implementation

Comment thread docs/team/DG_binh.md Outdated

The sequence diagram below summarizes how listing modules work:

![](../images/module/ListModule.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread docs/team/DG_swati.md Outdated
> **NOTE:** Two tasks and two lectures are displayed for each day based on the order in which the user added them, and if there are more, they will show as and when the user deletes the tasks/lectures that are currently displayed.

The below sequence diagram shows the execution process of the calendar display feature.
![](../images/calendar/CalendarDisplaySequence.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

  1. Diagram is difficult to read due to scaling.
  2. Return control arrows should be dotted. (Refer to: https://nus-cs2113-ay2122s1.github.io/website/se-book-adapted/chapters/uml.html#basic-2)

Comment thread docs/DeveloperGuide.md Outdated

The sequence diagram below summarizes how listing modules work:

![](images/module/ListModule.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image

Can indicate the return type for clarity instead of just "moduleList".

ngnigel99 and others added 30 commits November 8, 2021 22:38
…into branch-final-test

# Conflicts:
#	docs/DeveloperGuide.md
Add page break
add whitespace for formatting
Fix bug where item index of 1 cannot be added from reference stall
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.