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

[W8.6b][W15-B2] Kelvin Ting Hong Xiang #975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/seedu/addressbook/data/tag/Tagging.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package seedu.addressbook.data.tag;

import seedu.addressbook.data.person.Person;

/**
* Represents a the association between a person and a tag.
* Pre-conditions: There are commands to add and remove tags to a person in the address book.
*/
public class Tagging {
private Person person;
private Tag tag;
private String action;

public Tagging(Person person, Tag tag, String action) {
this.person = person;
this.tag = tag;
this.action = action;
}

public Person getPerson() {
return person;
}

public Tag getTag() {
return tag;
}

public String getAction() {
return action;
}

@Override
public String toString() {
return action + " " + person.getName() + " " + tag.toString();
}
}