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

[Anderson Leong] iP #206

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

Conversation

uosjapuelks
Copy link

No description provided.

Copy link

@Ashley-Lau Ashley-Lau left a comment

Choose a reason for hiding this comment

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

Overall, good effort in the checks for the input. However, do make sure not to put too much code into one line!

return userInput;
}

public static String GetItem(String userInput) throws IllegalToDoException, InvalidCommandException, EmptyCommand {

Choose a reason for hiding this comment

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

Follow camelCase naming convention for methods


public class Event extends Task {

protected String at;

Choose a reason for hiding this comment

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

Private may be a better access modifier since no class extends Event.


public class Event extends Task {

protected String at;

Choose a reason for hiding this comment

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

naming for at could be more descriptive of what it represents

private static void AcknowledgeAddition(String command, ArrayList<Task> unfilteredTasks) {
if (isToDo(command) || isDeadline(command) || isEvent(command)) {
System.out.println(LINE + "Got it. I've added this task:\t");
System.out.println(String.format("\t%d.", unfilteredTasks.size()) + unfilteredTasks.get(unfilteredTasks.size() - 1) + "\n" + String.format("\tNow you have %d tasks in the list.\n", unfilteredTasks.size()) + LINE);

Choose a reason for hiding this comment

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

Too many characters on this line! Occurred on other lines in this code

unfilteredTasks = loadFile(FILE_PATH, unfilteredTasks);
} catch (FileNotFoundException e) {
File dukeCheckpoint = new File(FILE_PATH);
try {

Choose a reason for hiding this comment

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

Instead of nesting try-catch block, try to include then in the same level.
try {
...
} catch (FileNotFoundException e) {
...
} catch (FileNotFoundException e){
...
}

+ "What do you need to do?\n"
+ LINE;

public static String getCommand(String userInput) {

Choose a reason for hiding this comment

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

Why are some methods private and some public? Seems to me that they are all only used in this class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants