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-T12-4] PAC #14

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

Conversation

lowjiayee
Copy link

damithc pushed a commit to damithc/tp-draft that referenced this pull request Mar 14, 2020
Updates to command parser and addreservationcommand
`EventParser`.
1. Then, the relevant class that corresponds to the command is created, with the information extracted
from the previous step passed into it. It modifies `Event` or `EventList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

Choose a reason for hiding this comment

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

The diagram looks neat and very informative. Perhaps more description would aid the user a better understanding of the diagram.

1. Once determined, the relevant class that corresponds to the type of command is created.
1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

Choose a reason for hiding this comment

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

The diagram shows clearly what is been created when the function is executed. However, description of the attendance class is not detailed enough. Users might wonder where is AttendanceList? Perhaps a few sentence regarding the details of the objects will aid the user a better understanding of the class. Furthermore, what does the grey box represents?

Choose a reason for hiding this comment

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

Description of the flow could be more detailed. Perhaps you can include the reason why such methods are implemented as such. The Pros and Cons of the methods and alternative methods.

###Calendar Implementation

*Figure 2: Class diagram of the Calendar component*

Choose a reason for hiding this comment

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

Class diagram of the Calendar component is missing from DG. Is this going to be added in the future update? Perhaps telling the user that it would be added in the future would let the user know that it is going to be added.

* Any classes (e.g. `Seminar`) that inherit from `Event` class will have similar control flow.

### Attendance
![attendance](images/Attendance.png "Class diagram of Attendance component")

Choose a reason for hiding this comment

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

The diagram does not display AttendanceList. Is this format correct? Perhaps an indication where AttendanceList is from would aid the user better understanding of the diagram.

Choose a reason for hiding this comment

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

Perhaps a sequence diagram will help users to understand the flow of the command execution?

Choose a reason for hiding this comment

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

Missing the AttendanceList class in the diagram. Agrees with previous comments about possibly adding a sequence diagram. Also, I feel that some arrows can be omitted.

*Figure 2: Class diagram of the Calendar component*

1. When a user enters a calendar-related command, the command is analysed by `CalendarCommandInterpreter`.
1. Once determined, the relevant information (eg. semester, academic year) are extracted by `CalendarParser`.

Choose a reason for hiding this comment

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

Perhaps clearer description of what's 'relevant information' would aid the user in better understanding. Is semester and academic year the only thing that is extracted by the CalenderParser?

![attendance](images/Attendance.png "Class diagram of Attendance component")
*Class diagram of the Attendance component*
1. When a user enters an attendance-related command, the command is analysed by `AttendanceCommandInterpreter`.
1. Once determined, the relevant class that corresponds to the type of command is created.

Choose a reason for hiding this comment

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

Perhaps clearer description of what's 'relevantclass' would aid the user in better understanding.

1. Then, either AddFirstSemester or AddSecondSemester class that corresponds the semester number is created.
1. Subsequently, it separates events by the required month and year in `CalendarList`
1. These commands are then returned to `Duke.run()` to `execute()`.

Choose a reason for hiding this comment

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

Description of the flow could be more detailed. Perhaps you can include the reason why such methods are implemented as such. The Pros and Cons of the methods and alternative methods.

Copy link

@thanhduc2000 thanhduc2000 left a comment

Choose a reason for hiding this comment

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

Overall, some class diagrams can be improved. All diagrams should not be auto-generated and your team could use drawing tool online instead. Moreover, you could start working on sequential diagrams for easier explanation

Comment on lines +29 to +30
![Command](images/Command.png "Class diagram of Command component")
*Class diagram of the Command component*

Choose a reason for hiding this comment

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

The diagram is hard to follow since the image is compressed and not viewable in the website and also not zoomable. Moreover, you are using an auto generated diagram from the system, which is not recommended

Comment on lines 61 to 62
![event](images/event.png "Class diagram of Event component")
*Class diagram of the Event component*

Choose a reason for hiding this comment

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

This diagram is informative and easier to follow. However, since this is auto-generated, there are some aspects that auto generated diagrams cannot express some terms in words like accessibility in methods (public, private, etc), and they refer to icons instead

Comment on lines 80 to 81
### Attendance
![attendance](images/Attendance.png "Class diagram of Attendance component")

Choose a reason for hiding this comment

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

Should add AttendanceList alo since it is covered in ListAttendance

{To be added in future revisions}

### Command
![Command](images/Command.png "Class diagram of Command component")

Choose a reason for hiding this comment

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

Is it possible to resize or restructure this diagram such that it is bigger?

Copy link

Choose a reason for hiding this comment

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

Is it possible to reorder the commands in the diagram so that the commands corresponding the same feature can be put together which makes it easier for the readers to understand?

Copy link

Choose a reason for hiding this comment

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

And I think omitting the constructors or some less important methods can simplify the commands diagram. In this way, it will be more easier for you to resize or restructure the diagram.

Choose a reason for hiding this comment

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

May be better to redraw the commands separately


## Feature Design and Implementation
### Event
![event](images/event.png "Class diagram of Event component")

Choose a reason for hiding this comment

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

Hi, is the format for this diagram (and other diagrams as well in this guide) correct? I think it is missing the private/public field for variable and method name.

Choose a reason for hiding this comment

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

Also, is this generated using SimpleUML plugin for intellij? I don't think it is recommended to auto generate the UML diagrams.

Choose a reason for hiding this comment

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

Might be better to redraw with the notations that we are more familiar with. Currently there are many arrows, some may be combined to reduce clutter.

Copy link

@Shannonwje Shannonwje left a comment

Choose a reason for hiding this comment

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

Overall DG is clear and well-explained. Some minor errors in formatting of the headers and a missing diagram but overall easy to understand.

* Any classes (e.g. `Seminar`) that inherit from `Event` class will have similar control flow.

### Attendance
![attendance](images/Attendance.png "Class diagram of Attendance component")

Choose a reason for hiding this comment

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

AttendanceList can't be seen inside the diagram, is this format correct? Maybe including AttendanceList would make understanding the diagram clearer, it can be in another diagram if AttendanceList can't fit into the current diagram or make the current diagram less neat.

Choose a reason for hiding this comment

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

Also, there is a grey box in some of the classes while it is not in some other classes. Is there some information missing or omitted in the diagram? Perhaps an explanation for the grey boxes would make it less confusing for the readers trying to understand the diagram

1. When a user enters an event-related command, the command is analysed by `EventCommandInterpreter`.
1. Once determined, the relevant information (e.g. index, name, time, date, venue) are extracted by
`EventParser`.
1. Then, the relevant class that corresponds to the command is created, with the information extracted

Choose a reason for hiding this comment

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

Diagram and explanation of the overall design and implementation looks neat but maybe giving an example of what you mean by relevant classes would make the understanding of the diagram better.

Choose a reason for hiding this comment

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

Unsure of what the relevant class refers to. Can be phrased more explicitly maybe.

1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

###Calendar Implementation

Choose a reason for hiding this comment

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

The header for Calendar Implementation seems to be off, it appears as "###Calendar Implementation" rather than an actual header of the section.

Choose a reason for hiding this comment

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

One change would be to make it "### Calendar Implementation" with a space in between instead.

Choose a reason for hiding this comment

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

Another suggestion would be to be consistent with the header names, to be "### Calandar" to be consistent with the header names before like "### Event" and "### Attendance"


###Calendar Implementation

*Figure 2: Class diagram of the Calendar component*

Choose a reason for hiding this comment

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

The class diagram for the calendar component seems to be missing, will it be added in the future? If it is currently not ready then maybe can consider not referencing to it now to avoid confusion for the readers.

* `acadamic year` is parsed into corresponding to only one year according to the semester in `EventParser` class.
* Calendar view of the whole year is not available. Only semester 1 or 2 of an academic year can be viewed at a time.
* Event name size must be less than 10 characters to be displayed neatly (current implementation), however
it can be implement to truncate longer names to fit nicely

Choose a reason for hiding this comment

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

Overall Design and Implementation is neat and relatively easy to understand. Perhaps can consider adding in examples with sample inputs of how each implementation would work rather than simply explaining the flow.

Choose a reason for hiding this comment

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

Another suggestion to help the reader understand more about your choice of design and implementation would be stating the different methods of implementation, weighing the pros and cons and stating the reason for choosing a certain implementation over another.

Copy link

@SibingWu SibingWu left a comment

Choose a reason for hiding this comment

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

Structures are generally good and clear. It would be better if you can add more sequence diagrams and replace the IDE-generated diagram

Comment on lines 28 to 30
### Command
![Command](images/Command.png "Class diagram of Command component")
*Class diagram of the Command component*

Choose a reason for hiding this comment

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

I suppose it would be better if the diagram is not so clustered? Also it seems that the IDE 0generated diagram is not encouraged for project submission

1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

###Calendar Implementation

Choose a reason for hiding this comment

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

image
It seems that the title here is not working well. Maybe consider to add one more space before "Calender Implementation"? i.e. ### Calendar Implementation instead of "###Calendar Implementation"

Comment on lines 80 to 81
### Attendance
![attendance](images/Attendance.png "Class diagram of Attendance component")

Choose a reason for hiding this comment

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

It seems that AttendanceList and EventList are missing in this diagram?

Choose a reason for hiding this comment

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

Consulted the prof: "It's OK to omit less important classes from the diagram"

Comment on lines 83 to 87
1. When a user enters an attendance-related command, the command is analysed by `AttendanceCommandInterpreter`.
1. Once determined, the relevant class that corresponds to the type of command is created.
1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

Choose a reason for hiding this comment

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

Maybe you can add a sequence diagram here to illustrate the execution?

Comment on lines 112 to 137
### Performance
![Performance](images/Performance.png "Class diagram of Performance component")
*Class diagram of the Performance component*
1. When a user enters a performance-related command, the command is analysed by `PerformanceCommandInterpreter`.
1. Once determined, the relevant class that corresponds to the command is created (e.g. AddPerformance,
DeletePerformance...), and ask for relevant information (e.g. event name, student name, student result) from the user.
1. Then, with the information extracted from the previous step passed into it. It modifies PerformanceList` under
the event class correspond to the input event name.
1. These commands are then returned to `Duke.run()` to `execute()`.

Note that:
* All PerformanceList class should be created under an Event class. A PerformanceList class cannot exist
by its own.
* All Performance commands are line-by-line commands. This aims to assist the user with correct command format and
prevent time wasted on key in wrong commands.

### Student List Collection
![Student](images/Student.png "Class diagram of Student component")
*Class diagram of the Student component*
1. When a user enters an studentList-related command, the command is analysed by `StudentCommandInterpreter`.
1. Once determined, the relevant class that corresponds to the type of command is created.
1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

{Describe the value proposition: what problem does it solve?}
Note that:
* studentList-related commands can be executed without the existence of events.

Choose a reason for hiding this comment

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

I am not sure if you format this on purpose, but it seems that those parts look similar to Event, Attendance, and Calendar Implementation. Maybe these two parts also belong to Feature Design and Implementation section?


1. When a user enters a calendar-related command, the command is analysed by `CalendarCommandInterpreter`.
1. Once determined, the relevant information (eg. semester, academic year) are extracted by `CalendarParser`.
1. Then, either AddFirstSemester or AddSecondSemester class that corresponds the semester number is created.

Choose a reason for hiding this comment

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

Just minor format thing: maybe better to emphasize the two classes? AddFirstSemester or AddSecondSemester

Copy link

@sliu107 sliu107 left a comment

Choose a reason for hiding this comment

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

All the diagrams are class diagrams, I think adding some sequence diagrams is helpful for readers to understand how each part work and how they are connected to each other.

{To be added in future revisions}

### Command
![Command](images/Command.png "Class diagram of Command component")
Copy link

Choose a reason for hiding this comment

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

Is it possible to reorder the commands in the diagram so that the commands corresponding the same feature can be put together which makes it easier for the readers to understand?

{To be added in future revisions}

### Command
![Command](images/Command.png "Class diagram of Command component")
Copy link

Choose a reason for hiding this comment

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

And I think omitting the constructors or some less important methods can simplify the commands diagram. In this way, it will be more easier for you to resize or restructure the diagram.


### Parser
*Class diagram of the Parser component*
There are total of four Parser classes as shown below. Each Parser class correspond to a feature
Copy link

Choose a reason for hiding this comment

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

It seems the diagram of parser compont is missing here.If you are going to add it in the feature, I think you can draw a class diagram here and add a sequence diagram to give an example at the end of this part.

## Design & Implementation
### UI
![Ui](images/Ui.png "Class diagram of Ui component")
*Class diagram of the UI component*
Copy link

Choose a reason for hiding this comment

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

Is it possible to show the high level association between UI and command class in the diagram? Or just add some description in words so that the reader can more easily understand how the ui is used in other classes and how ui be implemented.

Copy link

@ananda-lye ananda-lye left a comment

Choose a reason for hiding this comment

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

Maybe the generated diagrams can be used as reference only. As other reviewers have pointed out, the notation may not be entirely correct. Also, consider adding some sequence diagrams which will greatly aid in understanding how the classes interact with one another. Cheers ! :)

{To be added in future revisions}

### Command
![Command](images/Command.png "Class diagram of Command component")

Choose a reason for hiding this comment

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

May be better to redraw the commands separately


## Feature Design and Implementation
### Event
![event](images/event.png "Class diagram of Event component")

Choose a reason for hiding this comment

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

Might be better to redraw with the notations that we are more familiar with. Currently there are many arrows, some may be combined to reduce clutter.

* Any classes (e.g. `Seminar`) that inherit from `Event` class will have similar control flow.

### Attendance
![attendance](images/Attendance.png "Class diagram of Attendance component")

Choose a reason for hiding this comment

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

Missing the AttendanceList class in the diagram. Agrees with previous comments about possibly adding a sequence diagram. Also, I feel that some arrows can be omitted.

1. When a user enters an event-related command, the command is analysed by `EventCommandInterpreter`.
1. Once determined, the relevant information (e.g. index, name, time, date, venue) are extracted by
`EventParser`.
1. Then, the relevant class that corresponds to the command is created, with the information extracted

Choose a reason for hiding this comment

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

Unsure of what the relevant class refers to. Can be phrased more explicitly maybe.

1. Then, the class will execute base on its function. It modifies `AttendanceList`.
1. These commands are then returned to `Duke.run()` to `execute()`.

###Calendar Implementation

Choose a reason for hiding this comment

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

Seems to have some formatting error

benchan911 and others added 22 commits March 31, 2020 21:47
Reformat the Developer Guide to improve Readability: Added Content Page
Also deleted ui.displayMessage()
* Replace System.out.println to display

* Add list and delete to Event help

* Use StringBuilder in printGetHelp()

* Explain 'relevant class' better

* Add blank lines for better visual

* Change "Duke" to "PAC"

* Add Architecture in DG

* Change 'PAC' to 'Pac'

* Delete StudentListStorageParser (implemented in StudentList)

* Add Storage to DG

* Force change filename from uppercase to lowercase

* Force PACException.java to PacException.java

* Remove 'exam' and 'tutorial' from help command

* Now print error messages

* Change sout to UI.display

* Change ui.displayMessage() to UI.display()

Also deleted ui.displayMessage()

* Fix UI.display() not printing
Anqi-nus and others added 30 commits April 11, 2020 22:41
Allows app to continue running despite corrupted data
* adding studentCommandInterpreter SequenceDiagram

* edit abit of PPP
* documentation bug for sorting fixed

* fix a sentence

* final update

* adding the "." formatting

* remove "by the user"
* documentation bug for sorting fixed

* fix a sentence

* final update

* adding the "." formatting

* remove "by the user"

* grammar
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.