Skip to content

[learningcoding-pixel] iP#648

Open
learningcoding-pixel wants to merge 52 commits into
nus-cs2103-AY2526S1:masterfrom
learningcoding-pixel:master
Open

[learningcoding-pixel] iP#648
learningcoding-pixel wants to merge 52 commits into
nus-cs2103-AY2526S1:masterfrom
learningcoding-pixel:master

Conversation

@learningcoding-pixel

Copy link
Copy Markdown

No description provided.

@subhitsha-sp subhitsha-sp 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.

LGTM! The naming follows the standard conventions.

Comment thread src/main/java/cat/Ui.java
@@ -0,0 +1,18 @@
package cat;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How about adding javaDoc to your code?

// Constructor for the exception
public Exception(String message) {
super(message);
}

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 about implementing more types of exceptions to handle different errors?

Comment thread src/main/java/cat/Meow.java Outdated
Comment on lines +56 to +77
}else if(userInput.contains("unmark")) {
tasks.get(num - 1).setUnDone();
printAll(tasks);
}else if(userInput.contains("mark")) {
tasks.get(num - 1).setDone();
printAll(tasks);
}else if(userInput.contains("delete")){
tasks.remove(num - 1);
printAll(tasks);
}else if(userInput.contains("todo")) {
name = userInput.substring(5);
Todo todo = new Todo(name);
tasks.add(todo);
printAll(tasks);
}else if(userInput.contains("deadline")) {
int index = userInput.indexOf('/');
name = userInput.substring(9, index);
String endDate = userInput.substring(index + 1);
Deadline deadline = new Deadline(name, endDate);
tasks.add(deadline);
printAll(tasks);
} else if(userInput.contains("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.

Should this be better formatted?

Comment on lines +13 to +38
/**
* Creates a new Event task with the given name, start date, and end date.
*
* @param name The name or description of the Event task.
* @param startDate The start date of the event as a string (format as needed for display).
* @param endDate The end date of the event as a string in the format "d/M/yyyy HHmm".
*/
public Event(String name, String startDate, String endDate){
super(name,endDate);
this.startDate = startDate;
}


/**
* Returns the status of the Event task as a formatted string.
* Format: [E][status] name (Start: startDate) (End: endDate)
* Example: [E][X] Meeting (Start: 01/09/2025 1400) (End: 01/09/2025 1600)
*
* @return A string representing the task's completion status along with start and end dates.
*/
@Override
public String getStatus(){
String stat= isDone ? "[X]" : "[ ]";
return "[E]" + stat + " " + name + " " + "(Start: " + startDate + ") " + "(End:" + endDate + ")" ;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I like how easy it is to understand your java doc

Comment on lines +3 to +4
import java.io.*;
import java.util.*;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe it is better to import only what you need.

Comment thread text-ui-test/EXPECTED.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM – perhaps you can add this file to your .gitignore

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.

7 participants