-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Saha9616] iP #371
base: master
Are you sure you want to change the base?
[Saha9616] iP #371
Conversation
src/main/java/Deadline.java
Outdated
@@ -0,0 +1,24 @@ | |||
public class Deadline extends Task{ |
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.
Your files are missing package declarations
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 the classes be in a package?
src/main/java/Duke.java
Outdated
@@ -1,10 +1,93 @@ | |||
import java.util.*; |
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.
import.* syntax is discouraged
src/main/java/Event.java
Outdated
|
||
@Override | ||
public String toString() { | ||
if(super.status == true) { |
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.
There should be a space between if
and (
src/main/java/Duke.java
Outdated
|
||
lst.add(new Todo(str)); | ||
} | ||
else if((str.split(" ", 2)[0]).equals("deadline")) { |
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.
The if
here is also missing a space
src/main/java/Duke.java
Outdated
if((str.split(" ", 2).length == 1)) { | ||
throw new NoDescriptionException(); | ||
} | ||
else if((str.split(" ", 2)[0]).equals("todo")) { |
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 should consider using equalsIgnoreCase
instead
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.
Good job on the code 👍 !
src/main/java/Deadline.java
Outdated
@@ -0,0 +1,24 @@ | |||
public class Deadline extends Task{ |
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 the classes be in a package?
src/main/java/Event.java
Outdated
String[] mainSplit = super.task_name.split(" ", 2); //original : "event project meeting /from Mon 2pm /to 4pm" | ||
String name = mainSplit[1]; // gives "project meeting /from Mon 2pm /to 4pm" | ||
String[] StrList1 = name.split(" /from ", 2); //gives ["project meeting","Mon 2pm /to 4pm"] | ||
String nameMain = StrList1[0]; //gives "project meeting" | ||
String[] StrList2 = StrList1[1].split(" /to ", 2); //gives ["Mon 2pm", "to 4pm"] | ||
String frm = StrList2[0]; //gives "Mon 2pm" | ||
String to = StrList2[1]; //gives "to 4pm" |
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 proper naming of variables can help to reduce the number of comments. Maybe consider frm
to be renamed to startingTime
and to
to endingTime
.
Branch a code quality
THANOS
Thanos frees your mind of having to remember things you need to do. It's,
FASTSUPER FAST to useAll you need to do is
And it is FREE!
Features:
If you Java programmer, you can use it to practice Java too. Here's the
main
method: