-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add additional attributes to Item class and parameters to add methods #53
Add additional attributes to Item class and parameters to add methods #53
Conversation
# Conflicts: # src/main/java/seedu/binbash/command/AddCommand.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.
Apart from a few conciseness issues, looks good. Let's work on it together!
private final int itemQuantity; | ||
private final String itemExpirationDate; | ||
private final double itemSalePrice; | ||
private final double itemCostPrice; |
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 might be too many variables. We could look into defining sub-classes of Item to keep this list minimal in the future. Ex. Perishable extends Item
public AddCommand(ItemList itemList, String itemName, String itemDescription, int itemQuantity, | ||
String itemExpirationDate, double itemSalePrice, double itemCostPrice) { | ||
super(itemList); | ||
this.itemName = itemName; | ||
this.itemDescription = itemDescription; | ||
this.itemQuantity = itemQuantity; | ||
this.itemExpirationDate = itemExpirationDate; | ||
this.itemSalePrice = itemSalePrice; | ||
this.itemCostPrice = itemCostPrice; | ||
|
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 constructor appears needlessly verbose. Perhaps we could define it with an Item parameter instead. i.e public AddCommand(Item newItem)
No description provided.