-
Notifications
You must be signed in to change notification settings - Fork 78
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
src/main/java/Duke/Duke.java
Outdated
String logo = " _ _ \n" | ||
+ " | | | | \n" | ||
+ " | | __ _| | _____ \n" | ||
+ " _ | |/ _` | |/ / _ \\\n" | ||
+ " | |__| | (_| | < __/\n" | ||
+ " \\____/ \\__,_|_|\\_\\___|\n"; |
There was a problem hiding this comment.
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.
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); |
There was a problem hiding this comment.
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
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!"); |
There was a problem hiding this comment.
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.
Based on comments of PR review, Set logo to be a constant variable Edited readIn to inputReader (to use noun instead of verb for name convention of class)
This reverts commit be1a89e.
If the botMemory file does not exist, it then creates the "data" directory and "botMemory.txt" file
No description provided.