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
create customer class #61
Conversation
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.
Need to update javadocs and comments.
|
||
|
||
public static final String MESSAGE_CONSTRAINTS = | ||
"ContactNumber numbers should only contain numbers, and it should be at least 3 digits long"; |
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.
contact number should be 8 numbers instead i think
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.
fixed
|
||
/** | ||
* Returns true if both customers have the same identity and data fields. | ||
* This defines a stronger notion of equality between two persons. |
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.
javadoc comment change to customers
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.
fixed
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 some minor changes needed
|
||
public static final String MESSAGE_CONSTRAINTS = | ||
"ContactNumber numbers should only contain numbers, and it should be at least 8 digits long"; | ||
public static final String VALIDATION_REGEX = "\\d{3,}"; |
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 should be \d{8,}
import seedu.address.commons.util.StringUtil; | ||
|
||
/** | ||
* Tests that a {@code Person}'s {@code Name} matches any of the keywords given. |
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.
Should be Customer instead of Person
} | ||
|
||
/** | ||
* Adds a person to the 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.
Should be customer instead of person
*/ | ||
public class CustomerCard extends UiPart<Region> { | ||
|
||
private static final String FXML = "PersonListCard.fxml"; |
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 leave a TODO to remind to change when the fxml is ready
* Panel containing the list of persons. | ||
*/ | ||
public class CustomerListPanel extends UiPart<Region> { | ||
private static final String FXML = "PersonListPanel.fxml"; |
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 mark TODO
} | ||
|
||
/** | ||
* Custom {@code ListCell} that displays the graphics of a {@code Person} using a {@code PersonCard}. |
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.
Should be customer
/** | ||
* Replaces the customer {@code target} in the list with {@code editedCustomer}. | ||
* {@code target} must exist in the list. | ||
* The person identity of {@code editedCustomer} must not be the same as another existing customer in the 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.
should it be customer identity?
|
||
/** | ||
* Removes the equivalent customer from the list. | ||
* The person must exist in the 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.
person change to customer !
import seedu.address.model.customer.exceptions.DuplicateCustomerException; | ||
|
||
/** | ||
* A list of persons that enforces uniqueness between its elements and does not allow nulls. |
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.
all the persons should be changed to customer i think
No description provided.