Skip to content

Loh Zhi Qin iP#668

Open
lohzq88 wants to merge 24 commits into
nus-cs2103-AY2526S1:masterfrom
lohzq88:master
Open

Loh Zhi Qin iP#668
lohzq88 wants to merge 24 commits into
nus-cs2103-AY2526S1:masterfrom
lohzq88:master

Conversation

@lohzq88

@lohzq88 lohzq88 commented Sep 4, 2025

Copy link
Copy Markdown

Skye

The bot for your task tracking

A new instance of Skye can be generated by

Skye inst = new Skye();

You may download the source code from here. And it is FREE.

Some features we have developed

  • Set events
  • Search list of events
  • Delete events

damithc and others added 8 commits July 11, 2024 16:52
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.
Comment thread src/main/java/Skye.java Outdated
System.out.println("Hello from\n" + logo);

while (scanner.hasNextLine()) {
String line = scanner.nextLine();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could rename this to userInput instead to make it more clear

Comment thread src/main/java/Skye.java Outdated
String[] content = details.split(" /by ");
inst.addTask(new Deadline(content[0], content[1]));
}
else if (line.startsWith("event")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else if statement should be one line up to follow style of previous else if statements

Comment thread src/main/java/Skye.java Outdated
}

public static void main(String[] args) {
Skye inst = new Skye();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could rename this to instanceSkye

Comment thread src/main/java/Skye.java Outdated
String[] time = details.split(" /from ")[1].split(" /to ");
inst.addTask(new Event(description, time[0], time[1]));
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user enters a command that is not recognised? I think there should be an else statement to handle that case

@TeeJinSeng TeeJinSeng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall is still quite good, just that there are some minor mistakes and might need to handle more possible user input error that need to be fixed.

Comment thread src/main/java/Skye.java Outdated
@@ -45,7 +47,7 @@ public void markTask(int number) {
*/
public void unmarkTask(int number) {
printString("Ok, I have marked the task below as incomplete:");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of consistency with markTask, can move this line of printString 2 lines below, also printString should be done after the process is finished.

Comment thread src/main/java/Skye.java Outdated
}
} else {
inst.addTask(line);
} else if (line.startsWith("todo")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I have todosdescription here? Does your code treat it as invalid or as a valid command to create ToDo?

Comment thread src/main/java/ToDo.java Outdated
@@ -0,0 +1,11 @@
public class ToDo extends Task{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a space between "... extends Task" and "{"

Comment thread src/main/java/Deadline.java Outdated
@@ -0,0 +1,13 @@
public class Deadline extends Task{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a space between "... extends Task" and "{"

Comment thread src/main/java/Event.java Outdated
@@ -0,0 +1,15 @@
public class Event extends Task{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a space between "... extends Task" and "{"

Comment thread src/main/java/Task.java Outdated
taskName = name;
isComplete = false;
this.taskName = name;
this.isComplete = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually in this course, it is recommended to avoid unnecessary this keyword, you can refer to this:
https://se-education.org/guides/conventions/java/index.html#variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants