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

[Chi Lai Ping] iP #3

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

Conversation

Chilaiping
Copy link

No description provided.

@Chilaiping Chilaiping changed the title Chi Lai Ping [Chi Lai Ping] iP Aug 26, 2020
processInput(input, tasks);
} else {
greetNote("bye");
return;

Choose a reason for hiding this comment

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

Since the main() method is void type, perhaps use "break" is better here than use "return".


try {
switch(action) {
case List:

Choose a reason for hiding this comment

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

I like this part as you abstract all actions to different methods. It's more readable and clear

}

static Action validateCommand(String command) throws DukeException {
if(command.startsWith("list")) {

Choose a reason for hiding this comment

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

The way of validating the user input commands are smart. And this method is able to be extended.

binbinhui pushed a commit to binbinhui/ip that referenced this pull request Feb 19, 2021
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