[CS2113T-F12-1] PlanNUS#50
Conversation
…l-Logging Implemented Logging for LogInCommand.java
| ### 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. |
| |`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`| |
| 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.
The size of this image seems to be different from the other similar diagrams?
|
|
||
| #### 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`. |
|
|
||
| `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.
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.
Should the self-call validateModuleCode() have a return arrow, like in the other sequence diagrams?
EdmundEXE
left a comment
There was a problem hiding this comment.
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 { |
| try { | ||
| if (moduleValidator.isModTakenByUser(moduleCode)) { | ||
| removeUtils.removeModuleFromUserModuleList(moduleCode); | ||
| System.out.println(MODULE_REMOVED); |
There was a problem hiding this comment.
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.
Maybe can draw a diagram to show how these objects are created.
| */ | ||
| @Override | ||
| public void execute() throws AcademicException { | ||
| try { |
| <div style="text-align:center"> | ||
| <img src="./images/DeveloperGuide/editModuleCommand_initialState.png" alt="Initial state diagram for Edit Module Command"/> | ||
| </div> |
| <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.
As not everyone will know how to read this diagram, perhaps add an elaborate explanation with the diagram. I think there are multiple occurences
|
|
||
| * 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 |
| ### 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.
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.
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.
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.
| <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.
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.
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.
GuoAi
left a comment
There was a problem hiding this comment.
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.
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"/> |
| <div style="text-align:center"> | ||
| <img src="./images/DeveloperGuide/Project_structure.png" alt="Architecture diagram for ideal project structure in PlanNUS"/> | ||
| </div> |
| <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.
This sequence diagram is very clear and informative. Well done!
| ### 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.
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.
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.
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> |
ZhongNingmou
left a comment
There was a problem hiding this comment.
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.
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.
| <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.
This sequence diagram is very clear and the previous diagrams explained each step clearly! Well done.
| __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.
Maybe you can add diagrams of these steps.
mrwsy1
left a comment
There was a problem hiding this comment.
Overall well done, can consider adding more line breaks in between each section :)
| {Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
| Before reading this document, you are recommended to read through the [user guide](https://ay2021s1-cs2113t-f12-1.github.io/tp/UserGuide.html). | ||
|
|
||
| ## Table of contents |
There was a problem hiding this comment.
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. |
| 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.
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.
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.