Skip to content

[W5][M11-3] Dannica Ong - #39

Open
dannong wants to merge 1 commit into
nusCS2113-AY1819S2:masterfrom
dannong:master
Open

[W5][M11-3] Dannica Ong#39
dannong wants to merge 1 commit into
nusCS2113-AY1819S2:masterfrom
dannong:master

Conversation

@dannong

@dannong dannong commented Feb 10, 2019

Copy link
Copy Markdown

No description provided.

@nus-se-pr-bot

Copy link
Copy Markdown

Hi @dannong, your pull request title is invalid.

For PR sent to satisfy a learning outcome, the PR name should be in the format of [Learning Outcome ID][Team ID] Your Name, where [Learning Outcome ID] has no dashes or spaces (e.g. [W3.1a]) and [Team ID] has one dash only and no spaces (e.g. [W14-2] means Wednesday 2pm (14 hrs), Team 2).
E.g. If you are in tutorial W09 (i.e. Wednesday 9am), team 1, and is submitting a PR for LO W2.2b, the PR title would be [W2.2b][W09-1] James Yong. Note that your tutorial IDs are different from those shown in CORS/IVLE.

For team PR, the PR name should be in the format of [Team ID] Product Name (e.g. [T09-2] Contact List Pro).

Please follow the above format strictly and edit your title for reprocessing.

Note: this comment is posted by a bot. If you believe this is done in error, please create an issue at nus-se-pr-bot and add a link to this PR.

@dannong dannong changed the title added Person's gender [W5][M11-3] Dannica Ong Feb 10, 2019

@wanchinglim wanchinglim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Useful enhancement of adding the "Gender" option! Makes it easier if I have 2 friends of the same unisex name but of different genders. Code is easy to understand too.

@jemine1998

jemine1998 commented Feb 10, 2019

Copy link
Copy Markdown

hi @dannong

interesting add of person’s gender which can be beneficial for one to differentiate when adding contacts!

@devamanyu devamanyu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good PR which adds a gender field to the Addressbook Person format.

Try to have more fine-grained and detailed commits. At present there is just one commit which inhibits possibilities to track incremental updates. Also, please note the proper format to write commit messages . In particular, write the summary line and description of what you have done in the imperative mode, that is as if you were commanding someone. Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".

Minor comments are added for you to look at. Please close this PR after reading them.

import seedu.addressbook.data.person.Phone;
import seedu.addressbook.data.person.ReadOnlyPerson;
import seedu.addressbook.data.person.UniquePersonList;
import seedu.addressbook.data.person.*;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Importing everything using "*" (also known as wildcard imports) is generally discouraged and it also violates coding style. It reduces interpretability as to what packages are imported. Please note that your IDE might tend to create this error. Find out how to avoid it (https://stackoverflow.com/questions/3348816/intellij-never-use-wildcard-imports).

}

@Override
public Gender getGender() { return gender; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Probably would be better to stick to the K&R style of brackets as seen in the adjacent methods.

assertConstructingInvalidAddCmdThrowsException(Name.EXAMPLE, gender, Phone.EXAMPLE, true, Email.EXAMPLE, true,
Address.EXAMPLE, false, EMPTY_STRING_SET);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job on working with JUnit tests!

/**
* Represents a Person's gender in the address book.
* Guarantees: immutable; is valid as declared in {@link #isValidGender(String)}
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job for including class comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants