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

[T4A2][T1-04]Dao Han #114

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

DaoHanLim
Copy link

Tracks all add/delete tag functions.

@DaoHanLim DaoHanLim changed the title [T2A4][T1-04]Dao Han [T4A2][T1-04]Dao Han Jul 3, 2017
import seedu.addressbook.data.person.Person;

/** Association class to support the following functionality:
* When the AddressBook program exits, it should print out a list of all the tags added/deleted during that session.

Choose a reason for hiding this comment

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

A more precise description is Represents an adding or removing a Tag to/from a Person.

*/

public class Tagging {
private ArrayList<String> allTheTags = new ArrayList<>();

Choose a reason for hiding this comment

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

Based on the class diagram given in the exercise, the list of Tagging objects should not be in this class. If it was in this class, the diagram would be like this:
image

if (command == ADD_COMMAND) {
allTheTags.add("+ " + person.getName().toString() + " " + tag.toString());
}
else if (command == DELETE_COMMAND) {

Choose a reason for hiding this comment

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

coding standard violation?

}
}

// To print out a list of all the tags added/deleted during the session, when the AddressBook program exits.

Choose a reason for hiding this comment

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

Prints not To print..

private final String DELETE_COMMAND = "remove";

// Record tags added/deleted during that session.
public void trackTagging(String command, Person person, Tag tag) {

Choose a reason for hiding this comment

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

So Record or Track ? Be consistent.

@jeffryhartanto
Copy link

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

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