-
Notifications
You must be signed in to change notification settings - Fork 10
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][T01-T1]Wong Kai Min Herman #115
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package seedu.addressbook.data; | ||
|
||
|
||
import java.util.ArrayList; | ||
|
||
public class Tagging { | ||
ArrayList<String> tags; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recollect the discussion during tutorial on why this is not the right place to maintain the tagging list. Please check and differentiate the 2 diagrams in the activity description for better understanding |
||
public static final String addTag = "addTag"; | ||
public static final String delTag = "delTag"; | ||
|
||
|
||
public Tagging(){ | ||
tags = new ArrayList<String>(); | ||
} | ||
|
||
public void updateTags(String command,String name, String tag){ | ||
if(command.equals(addTag)){ | ||
tags.add(" + " + name + "[" + tag + "]" ); | ||
} | ||
else if(command.equals(delTag)){ | ||
tags.add(" - " + name + "[" + tag + "]" ); | ||
|
||
} | ||
} | ||
|
||
public String printTags(){ | ||
String tagString = ""; | ||
for(String tag : tags){ | ||
tagString += ("tag" + "\n") ; | ||
} | ||
return tagString; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation problem here? Our coding standard requires you to use 4 spaces instead of tabs. You can configure Eclipse to convert tabs to spaces automatically. |
||
} | ||
|
||
|
||
} |
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.
Missing header comment. All non-trivial classes and methods should have javadoc format header comments.