[T1duS] ip#680
Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
| String s = scanner.nextLine(); | ||
| String[] words = s.split(" "); | ||
|
|
||
| try{ |
| else if (words[0].equals("delete")) { | ||
| int i = Integer.parseInt(words[1]); | ||
| System.out.println("Noted. I've removed this task:"); | ||
| System.out.println(" " + tasks[i]); | ||
| for (int j = i; j < taskCount; j++) { | ||
| tasks[j] = tasks[j + 1]; | ||
| } | ||
| taskCount--; | ||
| System.out.println(" Now you have " + taskCount + " tasks in the list."); |
There was a problem hiding this comment.
Would it be better to extract out the tasks into individual classes? Perhaps it will make the code look cleaner
| tasks[++taskCount] = new Deadline(parts[0], parts[1]); | ||
| } else if (words[0].equals("event")) { | ||
| String[] parts = s.substring(6).split(" /from "); | ||
| String[] parts2 = parts[1].split(" /to "); |
There was a problem hiding this comment.
Perhaps a more intuitive variable name here?
| @@ -1,13 +1,18 @@ | |||
| public class Deadline extends Task { | |||
| protected String by; | |||
| private String by; | |||
There was a problem hiding this comment.
Perhaps can give the deadline date a clearer name? Right now the name "by" may not be clear to other programmers.
| @@ -0,0 +1,3 @@ | |||
| public class Parser{ | |||
There was a problem hiding this comment.
This is nitpicking but don't forget the space to follow coding standards. In the future can check through.
| @Override | ||
| public String toString() { | ||
| return "[T]" + super.toString(); | ||
| return "[T]" + (isDone ? "[X] " : "[ ] ") + description; |
There was a problem hiding this comment.
Perhaps you could add a method to Task class that returns a string with (isDone ? "[X] " : "[ ] "). Then you can call super.thisMethod for easier coding?
zacharyxzz
left a comment
There was a problem hiding this comment.
Looks good in general.
However, there are a few coding standard violations and potential areas for improvement.
| writer.close(); | ||
| } | ||
| catch (IOException e){ | ||
| return; |
There was a problem hiding this comment.
Perhaps logging or printing an error message could be helpful for diagnosing the exceptions here?
| taskList = new TaskList(storage.load()); | ||
| } | ||
|
|
||
| public void run() { |
There was a problem hiding this comment.
Could this method be refactored into smaller methods to handle the different scenarios more effectively?
Branch-level-10
A-checkstyle
A-Assertions
updated docs
finished userguide
BCD-Extension
A-CodeQuality
Refactor Opus class to remove Ui dependency and add new command handlers * The delete, mark, help, and bye command have been seperately added as command handlers. * Javadoc comments have been added for each of these handle command functions * The previous run method which used to execute these commands and use the UI class has been removed. Now the UI used is the JavaFX one. So, the commit also removed the UI class because it is not needed anymore.
What this commit does:
code quality and exception changes
Description
This is Duke project called Opus.
Opus is a chatbot that does the following:
Features
Opus has the following features:
It is like your own personal calendar
If you are a Java programmer, you can use it to practice Java too. Here's the main method:
👍 Hope you enjoy using Opus