Skip to content

Conversation

dheerajaraj
Copy link

No description provided.

Copy link

@kychua kychua left a comment

Choose a reason for hiding this comment

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

@dheerajaraj Some comments added. Please close the PR after reading

Avoid accumulating unrelated changes into a single PR.
Tip: If you are currently on branch1 and want to create a new branch2, you need to switch back to master branch before creating branch2. If not, changes in branch1 will appear in the PR created from branch2 later.

import seedu.addressbook.data.person.*;
import seedu.addressbook.data.tag.UniqueTagList.DuplicateTagException;

public class Tagging {
Copy link

@kychua kychua Sep 21, 2016

Choose a reason for hiding this comment

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

Missing header comment

public class Tagging {
private int status;
private Person person;
private UniqueTagList alltags;
Copy link

@kychua kychua Sep 21, 2016

Choose a reason for hiding this comment

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

based on the diagram given, this should not be here. Tagging is just the association between a Person and a Tag

import seedu.addressbook.data.tag.UniqueTagList.DuplicateTagException;

public class Tagging {
private int status;
Copy link

Choose a reason for hiding this comment

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

better to use enum

}

public String toString(){
String action = (status==1) ? "+" : "-";
Copy link

Choose a reason for hiding this comment

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

avoid magic numbers. what is 1?

for(Tag tag: alltags){
result += tag.toString();
}
return result;
Copy link

Choose a reason for hiding this comment

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

Coding standard violation! One more more of these problems detected:

  1. extra/missing spaces.
  2. brace style problem.
  3. missing braces.
  4. name doesn't follow naming convention


}

public Tagging(int status, ReadOnlyPerson targetPerson, Tag tag) throws DuplicateTagException{
Copy link

Choose a reason for hiding this comment

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

should be Person, not ReadOnlyPerson

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants