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

add Goods and Description #78

Merged
merged 9 commits into from Oct 10, 2019

Conversation

@ArgVampir
Copy link

commented Oct 9, 2019

Added Goods class
Resolve name issues from Driver Manager to Delivery Manager

@tysng tysng requested a review from AY1920S1-CS2103T-F14-4/developers Oct 9, 2019
public Goods(String name) {
this.name = name;
}
Comment for lines 7  – 9

This comment has been minimized.

Copy link
@junnbang

junnbang Oct 9, 2019

Maybe you can use "description" in place of "name" so that it is more flexible where you can include things like quantity, color, size, etc.
I suggest abstracting Description to a new class and include constraints on the string itself such as limit of 255 characters can make it more OOP. You can refer to Phone class for its VALIDATION_REGEX for character limits on string and MESSAGE_CONSTRAINTS for error handling.

This comment has been minimized.

Copy link
@ArgVampir

ArgVampir Oct 10, 2019

Author

Sure, I will try making it more OOP. Thanks for you suggestion!

@junnbang junnbang added this to the v1.2 milestone Oct 9, 2019
* Deals with the name of the product to be delivered.
*/

public class Goods {

This comment has been minimized.

Copy link
@tysng

tysng Oct 9, 2019

Maybe can consider adding more stuff to the Goods class. For example, a driver needs to deliver multiple items to one person, so can consider maintaining a list of items in the Goods class, and each item has a quantity, maybe.

In the end, you just need to format the toString() method nicely so we can just use the string representation of it.

This comment has been minimized.

Copy link
@ArgVampir

ArgVampir Oct 10, 2019

Author

Right thanx for the suggestion

@ArgVampir ArgVampir changed the title Goods branch add Goods and Description Oct 10, 2019
@tysng
tysng approved these changes Oct 10, 2019
@tysng tysng merged commit 44fa1c9 into AY1920S1-CS2103T-F14-4:master Oct 10, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.