-
Notifications
You must be signed in to change notification settings - Fork 270
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
[Ria Khaitan] iP #328
base: master
Are you sure you want to change the base?
[Ria Khaitan] iP #328
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 really clean code
src/main/java/Duke.java
Outdated
@@ -1,10 +1,108 @@ | |||
import exceptions.DukeExceptions; |
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 import statements be ordered differently?
src/main/java/Duke.java
Outdated
System.out.println("|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|"); | ||
} | ||
|
||
public static String makeDesc(String[] text, int len) { |
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 a more intuitive variable name here?
src/main/java/Task.java
Outdated
} | ||
} | ||
|
||
class ToDo 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.
I like how the code has been indented
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.
A good effort at following Java coding standards, with appropriate method naming and use of camelCase!
src/main/java/Duke.java
Outdated
File f = new File("/Users/riakhaitan/iP/ip/data/duke.txt"); | ||
f.createNewFile(); | ||
|
||
boolean directory = f.getParentFile().mkdirs(); |
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 a suggestion, perhaps you could use a name for this variable that is more boolean-sounding such as isDirectory? Good use of mkdir() here, creating a directory to store data
src/main/java/Task.java
Outdated
when = date; | ||
} | ||
public String toString() { | ||
return "[D]" + super.toString() + " (: " + |
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.
A good practice would be to place a line break before an operator! Good use of line break to improve readability
src/main/java/Duke.java
Outdated
String[] textSplit = textSplitOne[0].split(" "); | ||
String fullDesc = makeDesc(textSplit, textSplit.length); | ||
try { | ||
switch (textSplit[0]) { |
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.
For case clauses, there is no indentation
src/main/java/Duke.java
Outdated
System.out.println("You have " + lists.size() + " tasks left now! ^_^"); | ||
lineTwo(); | ||
break; | ||
case "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.
Logical units within a block should be separated by a line, perhaps a space after each case would be ideal!
Merge remote-tracking branch 'origin/add-gradle-support' into Add-gradle-support
Merge branch 'branch-A-CodingStandard'
use assertions
code quality
…cies To implement JavaFX and incorporate gui in our code, we need to add the related dependencies for it. We add the corresponding dependencies to our build.gradle so we are able to use JavaFX and incorporate gui in our code. We need to add dependencies to our build.gradle so we can use gradle to build our gui, this is the most efficient way.
Halloumi ChatBot ^_^
The Halloumi ChatBot keeps track of your tasks and progress, all in one place. It's,
easySUPER EASY to use ⏩If you're a Java programmer, you can use it to practice Java too. Here's the
main
method:All you need to do is,
Features:
Some commands to get you started with Halloumi are: