Skip to content
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-T12-2] Grocery in Time #33

Open
wants to merge 527 commits into
base: master
Choose a base branch
from

Conversation

wallywallywally
Copy link

Users can track and manage their groceries easily. They are reminded of what to buy and what should be used.

yeozongyao pushed a commit to yeozongyao/tp that referenced this pull request Mar 21, 2024
* In Ui class, modified the printGrocery method to print the 'location' of the grocery alongside the grocery name.
* Alternative considered: Can possibly add location as enumeration however different people might store groceries in different places thus better to set as String so that user is free to input location details however specific they want.

### 6. Edit grocery amount after using a grocery
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work on UML, however could your show how the user exits the app?
image

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks neat and organized! Perhaps you can an overall sequence diagram for your whole program to show how it works overall.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, class diagrams for classes like Ui, Parser, Grocery would better illustrate and complement your explanations

* Alternative considered: Can possibly add location as enumeration however different people might store groceries in different places thus better to set as String so that user is free to input location details however specific they want.

### 6. Edit grocery amount after using a grocery
* A `Grocery` stores its `amount` as an attribute. All `Grocery` objects are then stored in an ArrayList in `GroceryList`, which entirely handles the editing of the `amount`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, is the amount: int referring to quantity of the grocery item? There is also a cost attribute in the Grocery class as mentioned in line 18.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diagrams are simplified and easy to understand. Well done!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagrams are quite clear and neat as well as carefully matches the UG. however some of the minor detail seems missing such as after playing the game how the user quite and is it possible to store the information?

Copy link

@JingHaoooo JingHaoooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall well done!

Comment on lines 15 to 16
* if `eat`, store the name and calories of the input food
* if `view`, display all the foods consumed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall well done! However, there are some missing full stops in the DG.

Copy link

@Jamarcus111 Jamarcus111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of userguide

* Alternative considered: Can possibly add location as enumeration however different people might store groceries in different places thus better to set as String so that user is free to input location details however specific they want.

### 6. Edit grocery amount after using a grocery
* A `Grocery` stores its `amount` as an attribute. All `Grocery` objects are then stored in an ArrayList in `GroceryList`, which entirely handles the editing of the `amount`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagrams are quite clear and neat as well as carefully matches the UG. however some of the minor detail seems missing such as after playing the game how the user quite and is it possible to store the information?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your functionality for each version looks quite precise and straight to the point of what is needed for such product. Goodjob! However is there any other types of users you have to consider to add on other than financially-awre and health-concious, such as alergic to some food?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your CML interface looks very neat and easily understandable, goodjob! However, one possible adjustment could be align each same component together therefore better observations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of enumerations! Which is very good executable under this circumstance. Goodjob!

Copy link

@Zhengwinter Zhengwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally well written, except for some organizational problems as well as grammatical errors which may cause some confusion.

Comment on lines 15 to 16
* if `eat`, store the name and calories of the input food
* if `view`, display all the foods consumed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "if eat" and "if view", perhaps it would be clearer to mention which variable fulfils those conditions. It could be phrased as "if command == eat" and "if command == view".

* if `eat`, store the name and calories of the input food
* if `view`, display all the foods consumed

### 1. View all groceries added

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The numbering here is a bit confusing, I am not sure about how the DG is organized, because "Calories Management" was given index 1 earlier, so I am not sure how that fits in.

* First, create a field in "Grocery" class that stores the cost of a grocery.
* When adding a grocery, prompt the user to enter the cost.
* Format the cost into 2 decimal places, remove the dollar sign and store it as a string.
* Second, the grocery's cost accordingly before adding it into the list.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there seems to be a grammatical error here which makes the meaning difficult to understand.



### 3. Input category for each grocery added
* In Grocery class, modified the Grocery constructor to accept the 'category' parameter.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's better to phrase it this way, "the Grocery constructor was modified to accept the 'category' parameter".

Comment on lines +36 to +38
* In Parser class executeCommand method, modified the add command to prompt the user for the category of the grocery. Passed the category as a parameter when creating a new Grocery object.
* In Ui class, added a new method promptForCategory to prompt the user for the category of the grocery.
* In Grocery class, modified the printGrocery method to include the category information in the output string.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same phrasing issue, try to phrase it in passive voice.



### 5. Input the location of where each grocery is stored
* In Grocery class, modified the Grocery class to include location (String) as an attribute.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be clearer if "location" is formatted as code.

Comment on lines 99 to 111
| Version | As a ... | I want to ... | So that I can ... |
|---------|-------------------------------|---------------------------------------------|--------------------------------------------------------|
| v1.0 | new user | see instructions on how to use the app | refer to them when I forget how to use the application |
| v1.0 | user | add groceries to the app | manage all my groceries |
| v1.0 | user | view all my groceries | know what I have bought |
| v1.0 | user | delete groceries from the list | stop tracking those groceries |
| v1.0 | user | add the amount of a grocery | keep track of the amount of that item I have |
| v1.0 | user | add the expiration date of the grocery | keep track of when my items expire easily |
| v2.0 | financially-aware user | add the cost of the groceries | know how much I am spending |
| v2.0 | health-conscious user | categorise my groceries | know what types of groceries I have |
| v2.0 | user with many storage spaces | add the location of where an item is stored | see where I keep my groceries |
| v2.0 | user who consumes groceries | track the usage of my groceries | know how much I have left |
| v2.0 | user who cooks with recipes | create and keep my own version of recipes | refer to my own recipes when I cook |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After going through the user stories, I am not sure how the calories management sequence diagram fits into any of the user stories. Was this missed out or the calories management is a new feature?

### 5. Input the location of where each grocery is stored
* In Grocery class, modified the Grocery class to include location (String) as an attribute.
* In Grocery class, modified the Grocery constructor to accept the 'location' parameter.
* In Grocery class, under printGrocery, added locationString to format location.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explainations are relatively accurate and useful, excellant!

@@ -8,22 +8,107 @@

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to re-iterate the value proposition of your app at the beginning of the design and implementation section.

Comment on lines 106 to 111
| v1.0 | user | add the expiration date of the grocery | keep track of when my items expire easily |
| v2.0 | financially-aware user | add the cost of the groceries | know how much I am spending |
| v2.0 | health-conscious user | categorise my groceries | know what types of groceries I have |
| v2.0 | user with many storage spaces | add the location of where an item is stored | see where I keep my groceries |
| v2.0 | user who consumes groceries | track the usage of my groceries | know how much I have left |
| v2.0 | user who cooks with recipes | create and keep my own version of recipes | refer to my own recipes when I cook |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better to include a priority tag for each new user story

Comment on lines 19 to 20
* First create a method in "Grocery" class that prints the grocery in a preferred format.\
e.g., NAME, AMOUNT, EXPIRATION, PRICE.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a sample of the formats for all those inputs? (I can see you have already specified the format of expiration, but maybe a sample for all is more intuitive for other developers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet