-
Notifications
You must be signed in to change notification settings - Fork 140
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
[CS2113-T10-3] MangaTantou #9
base: master
Are you sure you want to change the base?
Conversation
import static constants.Regex.PRICE_OPTION_REGEX; | ||
import static constants.Regex.QUANTITY_OPTION_REGEX; | ||
import static constants.Regex.SPACE_REGEX; | ||
|
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.
Consider using enums instead of static constants like CATALOG_COMMAND to improve maintainability.
src/main/java/parser/Parser.java
Outdated
* which should specify an Add operation for either Manga or Author | ||
* @return a Command object representing the Add operation for Manga or Author | ||
* @throws TantouException if the user input is invalid for both Manga and Author Add commands | ||
*/ |
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.
consider extracting code (within each block) to individual methods if possible
src/main/java/parser/Parser.java
Outdated
return new AddSalesCommand(salesArguments); | ||
} | ||
throw new TantouException("Invalid sales command provided!" | ||
+ " You need to provide the author, manga, quantity sold, and unit price."); |
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.
Consider splitting the class as it has many functionality and can be separated into 2 different ones.
throw new JsonParseException("corrupt Manga object"); | ||
} | ||
JsonObject mangaJsonObject = json.getAsJsonObject(); | ||
|
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.
Instead of generic messages like "corrupt manga name", provide more informative ones that specify which field was invalid.
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.
Thanks for the feedback! The part you are referencing checks if the Manga
entry in the data file is a JsonObject
(whichs means it shouldn't be formatted as an array or anything else. I provided more informative messages if the mangaName
or deadline
contains issues in the following lines of code.
saveFile(authorList); | ||
return; | ||
} | ||
assert !existingAuthor.hasManga(deletingManga): "No manga found"; |
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 assertion check for finding the existence of authorName after already validating it before could be removed since they are unnecessary
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 diagrams are really clear and detailed!! 💯 Just some minor notations to change 😄 We found this from a past year forum that might be useful for formatting the diagrams: nus-cs2113-AY2324S2/forum#35
docs/uml/images/mangasales_class.png
Outdated
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 class diagram is really detailed and well-drawn! 🚀 However, there were some non-standard notation for the diagram mangasales_class.png
to note, according to prof, I think can refer to how the team did the command.png for the standard format too! 👍
Class name:
Perhaps for normal classes, I think we don't need to coloured green C!
such as from the addressbook example:
Visibility:
The symbols for the visibility could be changed to '+' and '-' or '#' accordingly too!
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.
Yes! This will be fixed once we include our standardised config file to the puml files.
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.
Noted on this, thanks for catching it!
docs/DeveloperGuide.md
Outdated
> **_NOTE:_** There is circular reference (bidirectional navigability) between `Author` and `Manga` through `MangaList`. | ||
|
||
### Commands | ||
![Command Inheritance](/docs/uml/puml/Command/Command.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.
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.
Ah, careless mistake! Thanks for helping us point it out early!
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.
Thank you, will look into that!
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 job on your guide! The explanations are mostly relevant and the diagrams are mostly appropriate. I just have several nits, as mentioned in my other comments.
docs/DeveloperGuide.md
Outdated
inheriting from the abstract `Command` class. Ensure that each new command class includes | ||
an implementation of the `execute` method and appropriately interacts with the `Ui` class |
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 you should not repeat yourself here regarding implementing the "execute" method?
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.
Thanks for the comment, I agree that the content is similar in nature regarding the execute
method but in the Guidelines, I had phrased it and targetted my language to be instructional towards the developers while in Structure, it is more of a generic description. Nonetheless, I hear you and will look into making the text more targetted with reduced repetition. Thanks again!
docs/DeveloperGuide.md
Outdated
For the AddSalesCommand to be successful, the manga that the sales data is associated with must exist. If the `sales` | ||
command is successful, the `Sales` data is then saved via Storage. | ||
|
||
![mangasales_class.png](uml/images/mangasales_class.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.
I think this class diagram is not relevant to this section and shouldn't be placed here?
class ArrayList<T> | ||
ArrayList <|-- AuthorList | ||
note on link : ArrayList<Author> | ||
ArrayList <|-- MangaList | ||
note on link : ArrayList<Manga> |
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.
Sorry, I'm not sure I understand you. They both inherit from ArrayList
, but AuthorList
extends ArrayList<Author>
, while MangaList
extends ArrayList<Manga>
. I still do believe the notes are necessary for show that distinction.
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.
Will be keeping this representation based on:
Your notation seems OK (* good!). Not sure what the comment means specifically.
*we don't cover this in CS2113; so you went beyond to learn the notation for generics inheritance.
specifying the type in the UML note seems OK to me as a way to explain to the reader what it means.
Originally posted by Prof in nus-cs2113-AY2425S1/forum#41 (comment)
cmd -> ui : print list as table with the required columns | ||
ref over ui, col : Print all required list and format rows | ||
return | ||
return done printing |
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.
group sd [Add required columns to list] | ||
ml -> row ** : add new PrintColumn | ||
row ++ | ||
return added to columns |
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.
You're right. Perhaps I can make it clearer by appending "to columns" to each top arrow.
docs/DeveloperGuide.md
Outdated
|
||
#### Storage Structure | ||
![StorageClass.png](uml/puml/StorageClass/StorageClass.png) | ||
The above UML class diagram outlines the structure of the classes related to saving data. |
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 line is not well formattted. I think it is meant to start on the next line
docs/DeveloperGuide.md
Outdated
#### Interaction | ||
The following diagram illustrates the interactions that take place when the | ||
user provides `"catalog -a Kubo Tite"` as an input. | ||
![add author sequence diagram](/docs/uml/images/AddAuthorSequence.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.
This is a broken link which is not visible.
docs/DeveloperGuide.md
Outdated
For the AddSalesCommand to be successful, the manga that the sales data is associated with must exist. If the `sales` | ||
command is successful, the `Sales` data is then saved via Storage. | ||
|
||
![mangasales_class.png](uml/images/mangasales_class.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.
May I clarify what is the meaning of the circle and square icons? If I remember correctly it should be + or - or omitted
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.
It is the default way for PlantUML to display the access modifier. But you are correct, we should be following the textbook for this course.
docs/DeveloperGuide.md
Outdated
|
||
The following sequence diagram illustrates the interactions that occur when the parser creates a new `AddSalesCommand`. | ||
|
||
![addsalesdata.png](uml/images/addsalesdata.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.
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.
You are right, it should not be there. Thank you.
Updated schedule to work with the new parser
DG - Schedule
Branch stress test
- Delete template PPP - Add Ian's file
Cut lines and reformat.
Branch finalise dg
Donovan's PPP
Give instructions on how to run the jar file.
- Adding sales data with command did not show the numbers that were just added as a message. This was fixed in AddSalesCommand.java - In SaleDeserializer.java, perform checks on the saleJsonObject before proceeding
Fix Sarah's PPP
Final fixes
Remove redundant spaces in code blocks in UG
The previous one did not work.
Try another horizontal line in DG
Fixes to images in DG
GitHub should look at the docs directory to find the updated README.md
Delete README.md
MangaTantou serves to manage the tasks under which editors in a manga company have to handle. This includes having to chase authors for deadlines, track sales revenue, manage authors’ salaries etc.