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

[Shirley] Duke Increments #447

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

Conversation

bitterg0d
Copy link

No description provided.

j-lum and others added 19 commits August 6, 2019 15:25
Add toolVersion block in to Gradle code sample to prevent errors.
Gradle defaults to an empty stdin which results in runtime exceptions
when attempting to read from `System.in`. Let's add some sensible
defaults for students who may still need to work with the standard
input stream.
Add configuration for console applications
# Conflicts:
#	src/main/java/Deadline.java
#	src/main/java/Duke.java
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Task.java Outdated Show resolved Hide resolved
src/main/java/Task.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Event.java Outdated Show resolved Hide resolved
src/main/java/Saved.java Outdated Show resolved Hide resolved
src/main/java/Saved.java Outdated Show resolved Hide resolved

for (Task task: list) {
if (task instanceof Event) {
s = "E" + " | "+ task.getDone() + " | " + task.getDesc() + " | " + task.getAt();

Choose a reason for hiding this comment

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

Rather than having multiple if else statements, you can create an abstract method on the Task class that converts the task to a suitable storage format.

Copy link

@jiayushe jiayushe left a comment

Choose a reason for hiding this comment

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

Good effort. Some comments for your consideration.

src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Deadline.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Duke.java Outdated Show resolved Hide resolved
src/main/java/Event.java Outdated Show resolved Hide resolved
src/main/java/Event.java Outdated Show resolved Hide resolved
src/main/java/Task.java Outdated Show resolved Hide resolved
Copy link

@elsakoh elsakoh left a comment

Choose a reason for hiding this comment

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

i liked that you abstracted out the different commands regarding list, very neat and easy to read code, keep up the good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants