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

[Toh Xuan Ning Jeanne] iP #398

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

Conversation

jeannetoh99
Copy link

No description provided.

Data is not persistent and flushes on each run.

This is not ideal for long term usage of this task manager.

Let's make the data persistent by saving and loading the tasks to and
from a "saved-tasks.txt" file. Let's also introduce OOP practices by
creating a Storage class to handle this.
The dates in deadlines are stored as Strings.

Storing dates as Strings is less ideal as it does not allow for sorting, etc.

Let's store deadline dates as a java.time.LocalDate instead.
src/main/java/Duke.java Outdated Show resolved Hide resolved
Comment on lines 21 to 22
return "deadline " + this.description + " /by " + this.by + System.lineSeparator()
+ this.isDone + System.lineSeparator();
Copy link

Choose a reason for hiding this comment

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

Should the wrapped line be indented 8 spaces relative to the parent line (line 20) rather than the previous line (line 21)? I've noticed the same issue in other parts of the code as well. (See Java coding standard -> Layout)

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, I thought that line 21 would be considered the parent line of line 22? I've seen the part of Java coding standard that you've pointed out, and I get that you're referring to the second example of:

if (isReady) {
    setText("Long line split"
        + "into two parts.");
}

However, I've also looked at parts outside of that example which seems to suggest the parent line is the line above. E.g.

method(param1,
        object.method()
                .method2(),
        param3);

I will further check with my TA regarding this and let you know the outcome! :) Thanks for pointing it out though!

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.

None yet

3 participants