Skip to content

[lordidiot] iP#527

Open
lordidiot wants to merge 51 commits into
nus-cs2103-AY2324S1:masterfrom
lordidiot:master
Open

[lordidiot] iP#527
lordidiot wants to merge 51 commits into
nus-cs2103-AY2324S1:masterfrom
lordidiot:master

Conversation

@lordidiot

@lordidiot lordidiot commented Sep 3, 2023

Copy link
Copy Markdown

A heading

  • A
  • bullet
  • list
  1. A
  2. numbered
  3. list
def a_fenced_code_block():
    with syntax_highlighting() as x:
        pass
  • add a task list
  • watch lecture

🤓

a blockquote

a hyper link

inline code?

some text formatting: bold, italic, strikethrough etc.

@Respirayson Respirayson 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.

Looks good 👍
Just a few nitpicks here and there

private static boolean handleInput(Parser parser, TaskList taskList, Ui ui) throws DukeException {
Task task;
switch (parser.getCommand()) {
case "bye":

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

perhaps it would be better to consider the case that the user might input the correct word but a different capitalisation? For eg. instead of bye, the user inputs Bye or BYE.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Definitely, will work on that.

Comment thread src/main/java/duke/Duke.java Outdated
ui.exit();
}

private static boolean handleInput(Parser parser, TaskList taskList, Ui ui) throws DukeException {

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 the function in that it is succinct and it is very readable. However, I think you might want to consider refactoring the code and extracting this function into the Parser class as that class deals with making sense of the user commands.

Comment thread src/main/java/duke/Ui.java Outdated
* Initialise UI. Prints banner.
*/
public void init() {
System.out.println("____________________________________________________________");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Small thing but perhaps it would be better to turn the underline into a constant so it can be easily reused elsewhere

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you! That makes sense, will do so.

return new ArrayList<>();
}

ArrayList<Task> tasks = new ArrayList<>();

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 you used tasks as the variable name for the Java Collections Object

package duke.mocks;

import duke.Task;
public class TaskMock 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.

I really like the usage of stubs when performing your unit testing. Really shows you went the extra mile!

* @throws DukeException Any errors encountered while storing
*/
public void storeTasks(List<Task> tasks) throws DukeException {
String serialized = tasks.stream()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very cool usage of streams 👍

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