Skip to content

[choonkit-nus] iP#83

Open
choonkit-nus wants to merge 21 commits into
nus-cs2113-AY2324S1:masterfrom
choonkit-nus:master
Open

[choonkit-nus] iP#83
choonkit-nus wants to merge 21 commits into
nus-cs2113-AY2324S1:masterfrom
choonkit-nus:master

Conversation

@choonkit-nus

Copy link
Copy Markdown

No description provided.

@irving11119 irving11119 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall your code is quite readable and it follows the standards well. Just remember to leave appropriate blank lines when you have multiple lines grouped together.

Comment thread src/main/java/Duke/Duke.java Outdated
Comment on lines +7 to +12
String logo = " _ _ \n"
+ " | | | | \n"
+ " | | __ _| | _____ \n"
+ " _ | |/ _` | |/ / _ \\\n"
+ " | |__| | (_| | < __/\n"
+ " \\____/ \\__,_|_|\\_\\___|\n";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps you could make this a constant instead.

Comment thread src/main/java/Duke/Duke.java Outdated
System.out.println(logo);
System.out.println("Hello! I'm Jake");
System.out.println("What can I do for you?");
Scanner readIn = new Scanner(System.in);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to use nouns as class names rather than verbs. So perhaps you could name this Scanner inputReader

Comment on lines +70 to +80
int startIndex = userInput.indexOf("/from ");
int endIndex = userInput.indexOf("/to ");
String startTime = userInput.substring(startIndex + 6, endIndex);
String endTime = userInput.substring(endIndex + 4);
int descriptionIndex = userInput.indexOf(text[1]);
String description = userInput.substring(descriptionIndex, startIndex);
Task t = new Event(description, startTime, endTime);
botMemory.add(t);
System.out.println("Added the following task:");
System.out.println(t.getDescription());
System.out.println("Now there are " + Task.getTaskCount() + " tasks in the botMemory list!");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps you could leave spaces in between statements to make your code more readable.

For example, you could add a line between your index variables and time variables.

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