Skip to content

[Andrea Tan] iP#263

Open
andrea-twl wants to merge 31 commits intonus-cs2103-AY2021S2:masterfrom
andrea-twl:master
Open

[Andrea Tan] iP#263
andrea-twl wants to merge 31 commits intonus-cs2103-AY2021S2:masterfrom
andrea-twl:master

Conversation

@andrea-twl
Copy link
Copy Markdown

No description provided.

Comment on lines +23 to +32
if (input.equals("list")) {
displayList(list);
System.out.println("\n");
} else if (input.contains("done")) {
String[] command = input.split(" ");
task = list.get(Integer.parseInt(command[1]) - 1);
System.out.println("Good job! I've marked this task as done:\n " +
task.markDone() +
"\n");
} else if (input.contains("delete")) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

do you think maybe switch statements could be used to make the code look more concise?

import java.util.ArrayList;
import java.lang.Throwable;

public class Duke {
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 some java docs will be useful to make the user understand the code better!

System.out.println("Alright! I've added this task: \n " +
task + "\nNow you have " + list.size() +
" task(s) in the list. \n");
} else {
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 think it is great that you implemented Duke Exceptions early!

@jingxueguo
Copy link
Copy Markdown

Hello! I think you did a great job following the Java coding standard, and for implementing the Duke Exceptions early by level-6!

} else if (input.contains("done")) {
String[] command = input.split(" ");
task = list.get(Integer.parseInt(command[1]) - 1);
System.out.println("Good job! I've marked this task as done:\n " +
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 think it's good that you kept the line of print statement short:>


import java.lang.Throwable;
public class Deadline extends Task {
String dueDate;
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 think dueDate should be used instead of by as the former is more understandable!

andrea-twl and others added 18 commits February 8, 2021 16:05
# Conflicts:
#	data/duke.txt
#	src/duke/Deadline.java
#	src/duke/Duke.java
#	src/duke/Event.java
#	src/duke/Task.java
#	src/duke/ToDo.java
# Conflicts:
#	src/duke/DukeIncompleteCommandException.java
#	src/duke/Event.java
#	src/duke/Parser.java
#	src/duke/Task.java
#	src/duke/TaskList.java
#	src/duke/ToDo.java
# Conflicts:
#	src/duke/.idea/workspace.xml
#	src/duke/TaskList.java
#	src/duke/Ui.java
#	src/duke/out/production/duke/duke/.idea/workspace.xml
#	src/duke/out/production/duke/duke/Parser.class
#	src/duke/out/production/duke/duke/TaskList.class
#	src/duke/out/production/duke/duke/Ui.class
#	src/duke/out/test/test/ParserTest.class
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.

3 participants