-
Notifications
You must be signed in to change notification settings - Fork 200
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
[Liam Van] IP #199
base: master
Are you sure you want to change the base?
[Liam Van] IP #199
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.
Nice, just nitpicking
src/main/java/Duke.java
Outdated
public static void main(String[] args) { | ||
|
||
Duke duke = new Duke(); | ||
ArrayList<String> userInputs = new ArrayList<>(); |
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.
Like your naming for the ArrayList!
src/main/java/Duke.java
Outdated
|
||
} | ||
exit(); | ||
} |
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.
Just nitpicking, but would be nice if there was a space after this :^)
src/main/java/Duke.java
Outdated
} | ||
public static void markDone(int index, ArrayList<String> userInputs, boolean isMark) { | ||
if (isMark) { | ||
String org = userInputs.get(index - 1); |
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 think it would be better to use a more descriptive name -- not sure what org
means here
…re to switch case
Add support for deleting tasks from the list. And Code cleanup
# Conflicts: # src/main/java/duke/Duke.java
src/main/java/duke/Duke.java
Outdated
Main function that takes user input and interpets how to store and what to do with it | ||
*/ | ||
public static void main(String[] args) { | ||
|
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.
Do avoid leaving spaces like this as it goes against the Java Coding Standards
src/main/java/duke/Duke.java
Outdated
public Duke() { | ||
|
||
} |
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.
Do consider removing empty methods, if not you could refactor some of your code into this. :)
src/main/java/duke/Duke.java
Outdated
+ "| | | | | | | |/ / _ \\\n" | ||
+ "| |_| | |_| | < __/\n" | ||
+ "|____/ \\__,_|_|\\_\\___|\n"; | ||
System.out.println("Hello from\n" + logo); |
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 notice that you have a tendency to use magic strings and numbers. Do try to avoid that where possible, and instead use constants to set your strings/numbers.
src/main/java/duke/Duke.java
Outdated
System.out.println("\t____________________________________________________________"); | ||
} | ||
/* | ||
This Returns the input as a Deadline object |
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.
Please remove such comments as they go against the java coding standards.
import dukeException.DukeException; | ||
|
||
public class Todo extends Task { | ||
public Todo(String description, boolean isMark) throws DukeException { |
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.
Please do remove the extra space between )
and throws
!
@@ -0,0 +1,5 @@ | |||
package dukeException; | |||
|
|||
public class DukeException extends Throwable { |
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.
Try not to leave your exceptions empty. Perhaps you could have the corresponding error message and a method to print/return the error message?
No description provided.