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

[W6.2][F09-3]Sandhya Gopakumar #133

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

Conversation

SandhyaGopakumar
Copy link

No description provided.

Copy link

@fanyiii fanyiii left a comment

Choose a reason for hiding this comment

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

Try create clean PRs for each sub task if needed, instead of putting everything under W6.2

@@ -53,7 +48,14 @@ public void setData(AddressBook addressBook, List<? extends ReadOnlyPerson> rele
this.addressBook = addressBook;
this.relevantPersons = relevantPersons;
}

/**Checks if the command mutates data.
Copy link

Choose a reason for hiding this comment

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

A more precise phrasing for the heade is Returns true if … (instead of Checks if …)

*/
public static boolean isMutating(String userCommandChoice)
{
if(userCommandChoice == "add" || userCommandChoice == "delete")
Copy link

Choose a reason for hiding this comment

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

You should make use of polymorphism for this task (having different implementations in different subclasses). There is also no need to make this a static method that takes in any arguments

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.

3 participants