-
Notifications
You must be signed in to change notification settings - Fork 92
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-T13-1] Shoco #15
base: master
Are you sure you want to change the base?
[CS2113T-T13-1] Shoco #15
Conversation
Fix stock commands to be directly executed.
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.
Hello! I think that your team's DG looks quite good, just that there are some minor fixes here and there! 👍 Perhaps, you guys can check if you are using Duke class or Shoco class as there are some confusions in some of the diagrams and maybe can think of more design considerations too? Overall, good work! 😄
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the add feature works. The details of the adding item's values | ||
are shown in a separate sequence diagram below: | ||
|
||
 |
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.
The sequence diagram is clear on how it works. I also think that the activation bar should be longer. Other than that, It looks great
docs/DeveloperGuide.md
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.
As per the image below,
- Should the method name be the same as the ref frame which stated "Add item values"?
- Should the alt frame be more near the left corner? 😆
- I think that this "X" in this frame may be a little redundant as it was the "X" can be found in your above diagram for the AddCommand instance.
docs/DeveloperGuide.md
Outdated
1. <code>Duke</code> class receives user input from the <code>Ui</code> class. | ||
2. A <code>Parser</code> object is created to call its <code>parseCommand</code> method. | ||
* The <code>Parser</code> object instantiates an <code>EditCommand</code> object based on the user input. | ||
3. The <code>Duke</code> class calls the <code>execute</code> method of the <code>EditCommand</code> object. |
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.
Perhaps for the execute method, you can call it as EditCommand#execute()?
docs/DeveloperGuide.md
Outdated
2. A <code>Parser</code> object is created to call its <code>parseCommand</code> method. | ||
* The <code>Parser</code> object instantiates an <code>EditCommand</code> object based on the user input. | ||
3. The <code>Duke</code> class calls the <code>execute</code> method of the <code>EditCommand</code> object. | ||
4. In the <code>execute</code> function, the <code>item</code> to be edited (based on the specified index of the |
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.
Perhaps, you can state what function you are calling to get the specified index as seen in your diagram for more user readability?
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 that suggestion, I will include it in!
|
||
- Alternative 1 (current choice): User must provided a description for item, Duplicates are | ||
not allowed in the list. | ||
- Pros: User has minimal potential to see unreasonable list in the Shopping List. For |
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.
Could this section be more simplified and maybe more explanation? It was a little confusing 😆
Maybe, can explain more about what is unreasonable list and minimal potential so that users can understand.
Perhaps could use words like "lesser probability of viewing incorrectly formatted list?"
|
||
##### Aspect: Data structure to support the edit feature | ||
|
||
- Alternative 1 (current choice): Only parameters present in user input are treated as values to update. |
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 design considerations! 👍
docs/DeveloperGuide.md
Outdated
<code>Command</code> class with a String representing the keyword specified by the user. | ||
|
||
The <code>Shoco</code> class first receives user input from the <code>Ui</code> class before it creates a | ||
<code>Parser</code> object and calls its <code>parseCommand</code> function to instantiate a |
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.
Perhaps, you can use Parser#parseCommand() and for the other methods in your description?
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the clear list feature works. Note the <code>Ui</code> class is | ||
omitted to emphasise the other classes: | ||
|
||
 |
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 following sequence diagram below shows how the reset budget feature works. Note the <code>Ui</code> class is | ||
omitted in the sequence diagram to emphasise on the other classes: | ||
|
||
 |
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 refer to the comment in Clear List feature!
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.
DG review, good job overall!
docs/DeveloperGuide.md
Outdated
|
||
##### Aspect: Data structure to support the add feature | ||
|
||
- Alternative 1 (current choice): User must provided a description for item, Duplicates are |
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 section could be clearer on why alternative 1 was chosen over alternative 2.
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the edit feature works. The details of updating the items' values | ||
have been omitted from the diagram. Those details are shown in a separate sequence diagram below: | ||
|
||
 |
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
 | ||
|
||
|
||
#### 3.2.2 Design considerations |
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 considerations, could be clearer if a short line were to be given to explain why the current choice is chosen over the other alternative.
docs/DeveloperGuide.md
Outdated
3. The <code>Duke</code> class calls the <code>execute</code> method of the <code>AddCommand</code> object. | ||
4. In the <code>execute</code> function, the <code>item</code> to be add is called from the <code>ShoppingList</code> | ||
object, using items.add(). | ||
5. In the SD, the AddCommand will add <code>item</code> if the description is provided and one / both price and |
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.
What does SD stand for? :o
3.1.1 Current implementation, Process of object creation, Point 4: From this statement "the item to be add is called from the ShoppingList object, using items.add()", I infer that
|
In the design considerations of each implemented feature, there is good explanation of the pros and cons of the alternatives considered. It would be good if the reason for ultimately choosing 1 alternative over the other is stated. |
UML diagrams are generally neat and consistent throughout the DG. One mistake spotted throughout is that the activation bar for constructors are not attached to the head. |
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, a clear and concise developer guide that is well formatted with clear diagrams.
For the design considerations section for your commands, it may be prudent to make a single statement as to why you chose to create a separate command class for each command, instead of repeating similar reasoning for each command.
Also, the activation bar should attached to the class, when you call a constructor, in your sequence diagrams.
For example, you guys have the bars detached from the class when Parser() is called. However, the module requires you to do something like this:
Otherwise your group's developer guide is a quality piece of work.
Keep up the great work!
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 DG! I really liked your sequence diagrams and the features you added. The pros and cons were nice to have an idea on how you approached the project. 👍
<code>Command</code> class. The user input **must contain at least a description** out of these parameters: | ||
*description*, *price*, *quantity*. User can choose not to input price or quantity as the price will set to | ||
default which is 0.0 if the user did not input any value for price. On the other hand, quantity will set to | ||
default which is 1 if the user did not input any value for quantity. |
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 description for the add feature is great, maybe adding a sample input and output would help see how the feature works?
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the add feature works. The details of the adding item's values | ||
are shown in a separate sequence diagram below: | ||
|
||
 |
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 sequence diagram is clear on how it works. I also think that the activation bar should be longer. Other than that, It looks great
docs/DeveloperGuide.md
Outdated
|
||
 | ||
|
||
#### 2.1.2 Design considerations |
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.
Just a minor thing, should this section be 3.1.2?
docs/DeveloperGuide.md
Outdated
|
||
Diagram 2: | ||
|
||
 |
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.
|
||
- Cons: Might significantly increase the code base with another class being added | ||
|
||
- Alternative 2: Implement the mark and unmark feature in either the <code>Duke</code> or <code>Parser</code> 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.
Maybe rename Duke to Shoco to match the name of the 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.
Other than that, great explanations 👍
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the <code>Shoco</code> object creates the <code>FindCommand</code> object. Note the <code>Ui</code> class is | ||
omitted in the sequence diagram to emphasise on the other classes: | ||
|
||
 |
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 sequence diagrams are great, and I have an idea of how the app works now. However, I noticed that most sequence diagrams contain how Duke and Parser work together, and the only things that change are the circled parts (FindCommand, AddCommand, DisplayCommand). Maybe you could add a separate section on how Duke and Parser work together, and then omit it from 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.
Then, the diagrams would be more focused on the feature itself
docs/DeveloperGuide.md
Outdated
having to edit the mark and unmark feature difficult. | ||
|
||
| ||
<b><a href="#developer-guide">🠝 back to top</a></b> |
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 really like that you added links to go back to the top :) very useful 👍
docs/DeveloperGuide.md
Outdated
The reset budget feature is implemented using a <code>ResetBudgetCommand</code> class which extends the main | ||
<code>Command</code> class with a variable representing the budget amount. | ||
|
||
The <code>Duke</code> class first receives user input from the <code>Ui</code> class before it creates a |
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.
For section 3 in general (implementation), the explanations for each feature are good. I noticed that for the add feature, the implementation is explained in a list, but it is just paragraphs for some other features. I think that maybe doing all of the explanations like the add feature would be great, and then it would help with consistency.
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.
Oh sorry, there are two screenshots, one for AddCommand and another for DisplayCommand. White background makes it look like there is only one 😅
docs/DeveloperGuide.md
Outdated
### Purpose of this guide | ||
This guide describes the software architecture and design of the SHOCO application. | ||
It will evolve throughout the design and implementation of each SHOCO release. | ||
Currently, this document is for the first public release of the application, SHOCO v1.0. |
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.
Small thing, but should this be SHOCO v2.0? I saw that the Appendix contains info about v2.0
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.
Very good DG. it is concise and clear!
docs/DeveloperGuide.md
Outdated
class, <code>WriteData</code> class, <code>FileUtil</code> class and | ||
<code>CommandLineTable</code> 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.
docs/DeveloperGuide.md
Outdated
|
||
<!-- @@author kokjoon97 --> | ||
The <code>Shoco</code> class manages all required resources in the execution of the application. These include | ||
a <code>ShoppingList</code> object to keep track of the <code>Item</code> objects the user has added to his list and | ||
a <code>Budget</code> object to store the user's budget. | ||
|
||
<code>Shoco</code> also has a <code>Storage</code> object for saving and loading data from memory - this data includes | ||
the latest saved <code>ShoppingList</code> and <code>Budget</code>. | ||
|
||
There is a dependency from <code>Shoco</code> to <code>Parser</code> as it only creates an instance of the <code>Parser</code> | ||
every time user input is received by the <code>Ui</code> and does not keep track of the <code>Parser</code> which is deleted | ||
after it is done parsing the current user input. The <code>Parser</code> determines what command is being invoked by the | ||
user before creating a new <code>Command</code> object. It then returns the reference to the new <code>Command</code> object | ||
to <code>Shoco</code>. | ||
|
||
At any point in time, <code>Shoco</code> only stores up to one <code>Command</code> and no more. This | ||
<code>Command</code> has to be executed before <code>Shoco</code> can receive more user input. | ||
<!-- @@author --> | ||
| ||
|
||
<b><a href="#developer-guide">🠝 back to top</a></b> | ||
|
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.
Very clear overview. Looks good!
docs/DeveloperGuide.md
Outdated
The following sequence diagram below shows how the add feature works. The details of the adding item's values | ||
are shown in a separate sequence diagram below: | ||
|
||
 |
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
|
||
This next sequence diagram will show how the <code>FindCommand</code> creates the <code>filteredItems</code> list: | ||
|
||
 |
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.
@@ -0,0 +1,70 @@ | |||
//@@author kokjoon97 |
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 sequence diagram used here is using minimal notation, but other diagrams have activiation bars so probably it is better to keep everything the same style.
@@ -0,0 +1,682 @@ | |||
package seedu.duke.utils; |
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 normal it is more like normal association so maybe change the dashed line in the UML?
@@ -0,0 +1,27 @@ | |||
package seedu.duke.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.
It should be better to let Shoco class has 1 Command class everytime as 0..1 is a bit weird.
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 it is a very well-written DG.
Branch portfolio
# Conflicts: # docs/DeveloperGuide.md
# Conflicts: # docs/DeveloperGuide.md # docs/slides/MarkUnmark.pptx # docs/slides/ResetBudget.pptx
Branch resize images
Branch refine v2.1
…into branch-PPPUpdate
Branch ppp update
Resize images....
…into branch-PPPUpdate
Branch ppp update
Resize images again
Final resize of images
Resize of images, edit pr issue number
Branch developer guide
Branch portfolio
Fix issue with diagrams not appearing
@kokjoon97 @Shannonwje @jiajuinphoon @trishaangelica