-
Notifications
You must be signed in to change notification settings - Fork 364
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jjiayyingtt] iP #325
base: master
Are you sure you want to change the base?
[jjiayyingtt] iP #325
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 looking good, but you might want to standardise your code style to comply with the standards.
src/main/java/Duke.java
Outdated
/*} else if (dataArr[0].equals("deadline ")) { | ||
operationHandler("deadline" + dataArr[2] + "/by" + dataArr[3]); | ||
} else if (dataArr[0].equals("event ")) { | ||
operationHandler("event" + dataArr[2] + "/from" + dataArr[3] + "/to" + dataArr[4]); | ||
}*/ |
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.
Maybe you might want to remove commented codes before committing to make the PR neater.
src/main/java/Duke.java
Outdated
} | ||
|
||
private static String[] stringProcessor(boolean isDeadline, String s){ // isDeadline = false meaning isEvent | ||
if (isDeadline){ |
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.
I have noticed several areas in your code without a space after if/for/method declarations. You might want to be careful as it will be painful when you need to resolve check style issues later on.
src/main/java/Deadline.java
Outdated
System.out.print("[D]"); | ||
super.printTask(); | ||
System.out.println("(by: " + date + ")"); |
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.
Nice, OOP from the start. But you might want to extract IO dependencies from your model classes, it will be easier when you decide to change your ui layer in the future.
src/main/java/Duke.java
Outdated
class DukeException extends Exception { | ||
|
||
public DukeException(String errorMessage){ | ||
super(errorMessage); | ||
} | ||
} |
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.
Should this be in its own file?
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.
Looks good to me, keep it up!
src/main/java/Duke.java
Outdated
err.printStackTrace(); | ||
} | ||
} | ||
} |
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.
This code is well indented and very readable!
src/main/java/Duke.java
Outdated
private static void startUp() { | ||
String name = "todo bot"; | ||
System.out.println("Hello from " + name); | ||
System.out.println("------------------------------------"); | ||
System.out.println("I can help you take care of your daily todos :)"); | ||
System.out.println("There are 3 types of tasks I can handle."); | ||
System.out.println("------------------------------------"); | ||
System.out.println("1. normal todo, format: "); | ||
System.out.println(" todo task"); | ||
System.out.println("2. deadline, format: "); | ||
System.out.println(" deadline task /by yyyy-mm-dd"); | ||
System.out.println("3. event, format: "); | ||
System.out.println(" event task /from yyyy-mm-dd /to yyyy-mm-dd"); | ||
System.out.println("------------------------------------"); | ||
|
||
} |
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.
Very well formatted print statements, easy to read!
Assertions are added to operationHandler, when tasks are added to the list.
Previous commit version's did not get tasks that were saved and it did not save tasks that were obtained from chatbot. Link the data file to the chatbot
Provide a way to easily snooze/postpone/reschedule tasks.
moved function within operationHandler out to addTask and Snooze
improved code quality
Duke Project
FASTSUPER FAST to useAll you need to do is,
3.add your tasks.
And it is FREE!
Features: