Skip to content
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

[Andrea Tan] iP #263

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Conversation

andrea-twl
Copy link

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")) {

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?

@@ -2,7 +2,6 @@

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

public class Duke {

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!

list.add(task);
System.out.println("Alright! I've added this task: \n " +
task + "\nNow you have " + list.size() +
" task(s) in the list. \n");
} else {

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

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 " +

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:>

public class Deadline extends Task {
String dueDate;
Copy link

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