-
Notifications
You must be signed in to change notification settings - Fork 282
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-F12-1] PlanNUS #50
base: master
Are you sure you want to change the base?
[CS2113T-F12-1] PlanNUS #50
Conversation
…l-Logging Implemented Logging for LogInCommand.java
docs/DeveloperGuide.md
Outdated
### Details | ||
|
||
#### Global Component | ||
Classes used by multiple components part of the global component of PlanNUS. This includes classes such as `App`,`Command` and `LoggingTool`. The main object classes `PartialModule`, `FullModule` and `Person` are also within the global component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should global be global
instead?
|`ModuleLoader`| Class representing all modules offered by NUS | `allModules` | | ||
|`Person`| Class representing current user's information | `currentPerson`| | ||
|`Ui`| Class representing java's default scanner class | `in`| | ||
|`String` | Class representing the module code to be added | `moduleCode`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should String
be in the diagram?
The following diagram summarizes what happens when the user executes a `ModuleDetailsCommand`: | ||
|
||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/moduleDetailsCommand_activity.png" alt="Activity diagram for View Module Details Command"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size of this image seems to be different from the other similar diagrams?
docs/DeveloperGuide.md
Outdated
|
||
#### Current implementation | ||
|
||
`SetSuBySemesterCommand` is executed by `CapCalculatorApp`. It provides users with a suggestion on how they can S/U their modules added in `AcademicPlannerApp` by retrieving the `userMduleList` from the `Person` object and filter the list according to the semester provided to get a `suList`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be userModuleList
?
docs/DeveloperGuide.md
Outdated
|
||
`SetSuBySemesterCommand` is executed by `CapCalculatorApp`. It provides users with a suggestion on how they can S/U their modules added in `AcademicPlannerApp` by retrieving the `userMduleList` from the `Person` object and filter the list according to the semester provided to get a `suList`. | ||
|
||
`suList` will then be analysed to provide user with a list of suggested S/U modules to achieve a best Cap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be CAP? To follow as per what the title said.
The following sequence diagram shows how `ModuleDetailsCommand` works. | ||
|
||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/moduleDetailsCommand_sequence.png"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the self-call validateModuleCode() have a return arrow, like in the other sequence diagrams?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a few minor changes, I felt that the DG greatly utilises diagrams to make explanations easy to understand, great job!
/** | ||
* Class representing main function of PlanNUS. | ||
*/ | ||
public class PlanNus { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try { | ||
if (moduleValidator.isModTakenByUser(moduleCode)) { | ||
removeUtils.removeModuleFromUserModuleList(moduleCode); | ||
System.out.println(MODULE_REMOVED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for printing something. According to your design, maybe can put it in the ui class?
private String moduleCode; | ||
|
||
public RemoveModuleCommand(ModuleLoader allModules, Person currentPerson, Scanner in, String moduleCode) { | ||
this.removeUtils = new RemoveUtils(currentPerson); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe can draw a diagram to show how these objects are created.
*/ | ||
@Override | ||
public void execute() throws AcademicException { | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments to take into consideration
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/editModuleCommand_initialState.png" alt="Initial state diagram for Edit Module Command"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/editModuleCommand_activity.png" alt="Activity diagram for Edit Module Command"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As not everyone will know how to read this diagram, perhaps add an elaborate explanation with the diagram. I think there are multiple occurences
docs/DeveloperGuide.md
Outdated
|
||
* The `global` package contains classes, exceptions and objects that are required across the whole app. | ||
* The `ui` package contains the class that is responsible for sharing one `scanner` class across the whole app to prevent multiple IO streams | ||
* The `parser` package contains the class that handles user's app selection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
### Architecture | ||
|
||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/Architecture.png" alt="Architecture diagram of PlanNUS"/> | ||
</div> | ||
|
||
The ***Architecture Diagram*** given above explains the high-level design of PlanNUS. Below is a quick overview of each component. | ||
|
||
|
||
|
||
### Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe try to see if you can merge the 2 sections, as right now, based on the formatting it looks separate when you are actually explaining the architecture diagram
|
||
#### Global, Ui, Parser, Storage, Apps | ||
|
||
* The `global` package contains classes, exceptions and objects that are required across the whole app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package is required across the whole app. But on the architecture diagram, we see that Global only has an arrow to PlanNUS which seemed to imply that it communicates only with PLanNUS and is independent of other packages.
Given below is an example usage scenario and how add module command behaves at each step. | ||
|
||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/addModuleCommand_initialState.png" alt="Initial state diagram for AddModuleCommand"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is arrows going into the Ui person and ModuleLoader, unclear what they are doing. The AddModuleCommand recieves some information from these 3, the diagram doesn't show what the relationship is.
docs/DeveloperGuide.md
Outdated
<img src="./images/DeveloperGuide/addModuleCommand_finalState.png" alt="Final state diagram for AddModuleCommand"/> | ||
</div> | ||
|
||
**Step 7** : `FileHandler`, `Logger`, `PartialModule`, `ModuleValidator`, `AddUtils` and `AddModuleCommand` are terminated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find what ModuleValidator did in the whole process.
|
||
__Step 2:__ The `execute()` method is called from the instance of `EditModuleCommand` which only throws `AcademicException` if applicable. | ||
|
||
__Step 3:__ Method `isModTakenByUser()` of the `ModuleValidator` is called to check if the `moduleCode` entered by the user exists within the `userModuleList` and `userModuleMap`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show this on the diagram. The diagram gives very little information on describing this sequence of steps. Maybe label the step numbers on the diagram for better clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DG is very nicely done! Perhaps you could also consider to add more explanations or diagrams at places which may cause confusion to new developers.
|
||
## Product scope | ||
### Target user profile | ||
* Table of contents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table of contents is well done! I like how I can navigate to different sections by clicking on the title.
|
||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/Architecture.png" alt="Architecture diagram of PlanNUS"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/Project_structure.png" alt="Architecture diagram for ideal project structure in PlanNUS"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/Packages_Interaction.png" alt="Sequence diagram for lifecycle of PlanNUS"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sequence diagram is very clear and informative. Well done!
docs/DeveloperGuide.md
Outdated
### Details | ||
|
||
#### Global Component | ||
Classes used by multiple components part of the global component of PlanNUS. This includes classes such as `App`,`Command` and `LoggingTool`. The main object classes `PartialModule`, `FullModule` and `Person` are also within the global component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The introduction of your global component sounds a bit abstract to me. It seems to contain several classes, but I cannot get information about how these classes interact with each other and what the function of each class is. Would it be better if you insert a class diagram here?
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/addModuleCommand_state6.png" alt="State diagram for AddModuleCommand Step 6"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The object diagrams you use to show the state after each step are very clear!
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/addModuleCommand_sequence.png" alt="Sequence diagram for AddModuleCommand"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this diagram showing the different branches given different cases of user inputs.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/editModuleCommand_activity.png" alt="Activity diagram for Edit Module Command"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall your job is good but may need to add more details.
* `commands`: A package that handles all executable commands given by parser | ||
* `commons`: A package with the utilities and shared classes across the parent package | ||
* `exceptions`: A package to handle all exceptions thrown across the parent package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can explain more about "App Entry Point" because it shows in your diagram but there is no explanation about this.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/Details_architecture.png" alt="Details architecture diagram of PlanNUS"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/addModuleCommand_sequence.png" alt="Sequence diagram for AddModuleCommand"/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sequence diagram is very clear and the previous diagrams explained each step clearly! Well done.
docs/DeveloperGuide.md
Outdated
__Step 4:__ `in` reads the next line of input for user's choice of modifying either the semester or grade of the selected `moduleCode`. | ||
|
||
__Step 5:__ `isValidSemester()` or `isValidGrade()` is called to validate the semester or grade entered by the user. | ||
|
||
__Step 6:__ `updateModuleSemester()` or `updateModuleGrade()` is then called to conduct necessary changes to the information by accessing the module from `userModuleMap` and `userModuleList`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add diagrams of these steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall well done, can consider adding more line breaks in between each section :)
docs/DeveloperGuide.md
Outdated
|
||
## Table of contents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better if u numbered the individual sections for the table of contents? And the sections themselves
<img src="./images/DeveloperGuide/Architecture.png" alt="Architecture diagram of PlanNUS"/> | ||
</div> | ||
|
||
The ***Architecture Diagram*** given above explains the high-level design of PlanNUS. Below is a quick overview of each component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following options were considered when implementing commands: | ||
|
||
* Option 1 (Current Implementation): Implementing each command as a class by itself | ||
* Pros: Increases modularity of code, higher overall code quality | ||
* Cons: More complicated to implement | ||
* Option 2: Implementing each command as a method in a class | ||
* Pros: Easier to implement | ||
* Cons: Class needs to be instantiated and increases coupling, reducing testability. This method also decreases SLAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe u can put this into table format so it's easier to read and do comparison between pros and cons
Given below is an example usage scenario and how add module command behaves at each step. | ||
|
||
<div style="text-align:center"> | ||
<img src="./images/DeveloperGuide/editModuleCommand_initialState.png" alt="Initial state diagram for Edit Module Command"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can have a caption underneath the image to relate it to the steps, otherwise a little confusing
[UG, DG] Readability improvements
# Conflicts: # docs/UserGuide.md
Update UG after PE dry run
Update PPP
…into WIP-Jerrold
Fix bugs when shifting modules
Update PPP and AboutUs
Fix Bug in storage check
…into WIP-Jerrold
Fix handling of duplicated modules
Add further checks for adding modules
Add cautions in UG
Fix Capcalc message
[PPP] fixed broken reposense link
Updated PPP
Bug Fixes
PlanNUS helps NUS undergraduates plan their academic journey in NUS. It is optimized for CLI users as commands can be typed in faster by undergraduates.