-
Notifications
You must be signed in to change notification settings - Fork 236
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-1] mTracker #32
base: master
Are you sure you want to change the base?
[CS2113T-T12-1] mTracker #32
Conversation
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, the developer guide provides a wide overview as well as some of the implementation/design rationales behind the components in the application. There was a good use of colours as well to "isolate" the different components for reader to follow.
However, some of the things that I felt could be improved in my opinion would be consistency and maybe reducing/decomposing some of the complex diagrams (which may help in readability).
But again, overall, good job and have a nice day!
docs/DeveloperGuide.md
Outdated
## Design | ||
|
||
> Tip: The diagrams in this guide were designed using PlantUML. | ||
> Their original .puml files can be found in the diagrams folder here. |
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 that this might be due to time constraints but, maybe the "here" could be hyperlinked?
docs/DeveloperGuide.md
Outdated
|
||
Major components of the app: | ||
* `MTracker` contains the `main` method responsible for launching and | ||
running the app. It first initializes the other components in the correct sequence |
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 use of "correct sequence" seems to be confusing since there isn't any part telling the read the "correct sequence" to initialize, maybe a general idea of initialization would be sufficient?
instructions for user input, and other display texts. The class contains both | ||
strings of commonly used display texts like the console input prompter, and | ||
methods that print these strings out, thus ensuring satisfactory user interface and | ||
communication with user. |
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.
This is diagram has its good points as it has colours to signify the different components which the system and the colours matches those in the other 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.
The only exception of the mismatch of colours would more likely be the ones in the sequence diagrams, though I understand that this could be due to readability reason of the sequence diagram. Perhaps, a different colour scheme could be used for Ui. Or have a note on the sequence diagram - similar to like a legend and explain why the use of another shade colour for the component.
* `filemanager` is responsible for saving the session's instruments data to local file, updating | ||
them during runtime, and restoring data from previous session when the program is relaunched. | ||
|
||
The subsequent sections will elaborate on the more technical design and implementation details of |
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.
Really good to have this here, especially to "guide" the reader on what the subsequent parts will be focusing on, in relation to this architecture.
docs/DeveloperGuide.md
Outdated
The figure below represents the class diagram of how all the parser classes interact with classes outside the `console` | ||
package: | ||
|
||
<img src="images/ConsoleDiagram.png" width="550"/> |
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 an additional note or a line of clarification after the digram would be nice to explain why the class diagrams themselves do not contain any methods/variables.
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.
|
||
### Parser component | ||
|
||
The main parent class in `console` package is the `InputParser` class which is defined in `InputParser.java`. |
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.
Great to have this here to tell reader what this class/component does and what the following diagram is for.
Two alternatives to get the instrument information from the user were considered. The first alternative was to | ||
get the user to add in all the information in a single line with separators | ||
(for example: `stock TSLA; 909.68; negative; To buy`). This was not implemented as it is likely | ||
for the user to enter the parameters in the wrong order. This becomes especially problematic if there are multiple |
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 is good since it tells the reader the rationale being why this previous complex example was not taken into implementation.
docs/DeveloperGuide.md
Outdated
* The command classes are dependent on the `TextUi` class. This allows the command class to display its execution results to the user. | ||
|
||
|
||
The figure below represents the sequence diagram when the user executes a done 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.
Maybe could give a more specific use case description, in terms of what this test case does using index? From a reader's point of view, the 1 seems be taken in as an index as of the diagram, but not much seems to be explained about it in terms of the use case, like does this 1 mean just in general any of the instruments that is first in this instrument list, maybe this could be specified here?
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 this half of the Command component can be shifted to after the instrument feature? That way, readers would have a rough idea of the implementation behind the instruments which can flow well into the use case of this done Command (Don't mind me too much! Just a suggestion)
|
||
The figure below represents the sequence diagram when the user wants to add a stock: | ||
|
||
<img src="images/AddStockSequenceDiagram.png" width="1040"/> |
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 might be nit-picky, but maybe the the small "hole" between :AddStockParser and the activation bar can be removed? Similarly with the :AddStockCommand
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.
Good use of notes to explain some of the "hidden" logic eg. the prompting of user for more input details.
docs/DeveloperGuide.md
Outdated
The figure below represents the class diagram of how all the parser classes interact with classes outside the `console` | ||
package: | ||
|
||
<img src="images/ConsoleDiagram.png" width="550"/> |
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.
|
||
<img src="images/ConsoleDiagram.png" width="550"/> | ||
|
||
How the `InputParser` class works: |
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 it will be helpful to include a sequence diagram to show how the different classes interact with one another during the processing of a command.
docs/DeveloperGuide.md
Outdated
in `InstrumentManager.java` and `Instrument.java` respectively. This figure below represents the class diagram of | ||
how the different class work together: | ||
|
||
<img src="images/ModelDiagram.png" width="550"/> |
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
|
||
The Command component contains all the commands classes, where its respective class is instantiated when a valid command is entered by the user. | ||
|
||
Commands include: |
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 it will be clearer to display the Commands in a table with a short description of what they do, either here or in an appendix.
Slight typo in AddCryptoCommand
docs/DeveloperGuide.md
Outdated
|
||
The figure below represents the sequence diagram when the user executes a done command: | ||
|
||
<img src="images/DoneCryptoSequenceDiagram.png" width="1040"/> |
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 it will be clearer if the sequence diagram leaves out less important method calls. E.g., getIndex(), getTypeIcon(), getStatusIcon(). As per the instructions here
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.
Agreed! If you would like to go into more details on the parsing process, perhaps consider using a ref frame instead :)
|
||
<img src="images/DoneCryptoSequenceDiagram.png" width="1040"/> | ||
|
||
### FileManager 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.
3) AddStockCommand | ||
4) ExitCommand | ||
5) InvalidCommand | ||
6) ListCommand |
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.
Is DoneCommand
supposed to be listed here as well? It was mentioned in the sequence diagram below but not here, which was slightly confusing.
docs/DeveloperGuide.md
Outdated
|
||
The figure below represents the sequence diagram when the user executes a done command: | ||
|
||
<img src="images/DoneCryptoSequenceDiagram.png" width="1040"/> |
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.
Agreed! If you would like to go into more details on the parsing process, perhaps consider using a ref frame instead :)
`AddInstrumentParser` support the parsing of different instruments and their parameters. | ||
This implementation provides greater extensibility to the add functionality to support more instrument types. | ||
|
||
Two alternatives to get the instrument information from the user were considered. The first alternative was to |
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.
While I think it is great that you explained the rationale for your specific choice of implementation, I feel that this segment could have been moved to the "Add instrument feature" segment instead so that this segment is just for showing the overall architecture of the component :)
`AddInstrumentParser#filterByInstrumentType()` which will then guide the user through the process of adding a new | ||
instrument. | ||
|
||
The figure below represents the sequence diagram when the user wants to add a stock: |
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.
Hi T12-1. I've left some comments about your TP code. Hope it helps.
|
||
import java.io.ByteArrayInputStream; | ||
import java.time.LocalDate; | ||
|
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.
@kum-wh perhaps remove this extra space?
import java.util.HashSet; | ||
import java.util.Locale; | ||
|
||
public class EditInstrumentParser extends InputParser { |
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.
@kum-wh @KVignesh122 @KVignesh122 @williamlamjy Overall, your code is neat, congrats! But maybe you could add javadoc comments for more complicated methods that may require explanation... I saw some long chunks of code, but no comments..
# Conflicts: # docs/DeveloperGuide.md
…into branch-DG-UserStories * 'master' of https://github.com/AY2122S1-CS2113T-T12-1/tp: (164 commits) PPP Fix checkstyle errors Fix according to pr review edits edits edited to pr and resize Remove space fix i/o redirection test Fix abort in main issue Make instrument decoders attribute protected not public edited accroding to pr Improve code quality Make edit status error messages more specific and remove polling for edit past returns added ppp not finished Fix import errors and ide warnings sizing edits to diags Changes based on PR edited encoding diag Fix merge conflict ...
added java docs for filemanager
Add dg extra sections
Check the files and author tags
…into branch-DG-changes * 'master' of https://github.com/AY2122S1-CS2113T-T12-1/tp: Fix according to PR Fix spacing message. Fix jar naming. Changes according to PR Some changes Fixing links Changes according to PR More of abort section Adding the abort section
diag changes
…l-change Final change
…atting Fix formatting issue
Fix author tags
mTracker is a command-line based trading journal interface that allows investors and traders to store and view important trading related information on their shortlisted financial instruments for reference and decision-making. It summarises key details into an easy-to-read format and helps to track profits/losses, thus providing convenient lookups for busy individuals.