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

[choonkit-nus] iP #83

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

Conversation

choonkit-nus
Copy link

No description provided.

Copy link

@irving11119 irving11119 left a comment

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 on lines 7 to 12
String logo = " _ _ \n"
+ " | | | | \n"
+ " | | __ _| | _____ \n"
+ " _ | |/ _` | |/ / _ \\\n"
+ " | |__| | (_| | < __/\n"
+ " \\____/ \\__,_|_|\\_\\___|\n";

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.

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);

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!");

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