-
Notifications
You must be signed in to change notification settings - Fork 364
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EksdeeeX] iP #348
base: master
Are you sure you want to change the base?
[EksdeeeX] iP #348
Conversation
# Conflicts: # src/main/java/Deadline.java # src/main/java/Duke.java # src/main/java/Event.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall code looks good 馃憤, only a few minor mistakes relating to coding standards.
Additionally, apart from your code, remember that for each git commit to include a commit message subject (a requirement from the git conventions).
Keep up the good work and all the best for the future weeks!!!
src/main/java/Duke.java
Outdated
boolean isDescripton = true; | ||
boolean first = false; | ||
boolean second = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename the variables, first
& second
, to something similar to isDescripton
to follow the coding standard?
boolean isDescripton = true; | |
boolean first = false; | |
boolean second = false; | |
boolean isDescripton = true; | |
boolean isFirst = false; | |
boolean isSecond = false; |
src/main/java/Data.java
Outdated
|
||
public ArrayList<Task> load() throws FileNotFoundException { | ||
Scanner sc = new Scanner(this.saved); | ||
ArrayList<Task> list = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a more specific name can be use for the array list (e.g. tasksList)
src/main/java/Data.java
Outdated
public class Data { | ||
private DateTimeFormatter savedFormat = DateTimeFormatter.ofPattern("dd/MMM/yyyy HHmm"); | ||
private DateTimeFormatter loadFormat = DateTimeFormatter.ofPattern("yyyy/MM/dd HHmm"); | ||
private boolean exist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a better naming convention for exist
src/main/java/Duke.java
Outdated
if(task[i].equalsIgnoreCase("/from")) { | ||
first = true; | ||
isDescripton = false; | ||
continue; | ||
} | ||
if(task[i].equalsIgnoreCase("/to")) { | ||
second = true; | ||
first = false; | ||
continue; | ||
} | ||
if(first) { | ||
start.append(task[i] + " "); | ||
} | ||
if(second) { | ||
end.append(task[i] + " "); | ||
} | ||
if(isDescripton) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spacing can be added to after each if
to follow the coding standards
if(task[i].equalsIgnoreCase("/from")) { | |
first = true; | |
isDescripton = false; | |
continue; | |
} | |
if(task[i].equalsIgnoreCase("/to")) { | |
second = true; | |
first = false; | |
continue; | |
} | |
if(first) { | |
start.append(task[i] + " "); | |
} | |
if(second) { | |
end.append(task[i] + " "); | |
} | |
if(isDescripton) { | |
if (task[i].equalsIgnoreCase("/from")) { | |
first = true; | |
isDescripton = false; | |
continue; | |
} | |
if (task[i].equalsIgnoreCase("/to")) { | |
second = true; | |
first = false; | |
continue; | |
} | |
if (first) { | |
start.append(task[i] + " "); | |
} | |
if (second) { | |
end.append(task[i] + " "); | |
} | |
if (isDescripton) { |
These assumptions have to be met in order for code to function without error. In some cases, the code might be errneous and these assertions will help identify them. Assertions act as a checker for correct code. Assertions are important.
Code quality could be improved in some areas. Code was edited in accordance to code quality standards. Code quality standards should be followed to ensure uniformity. Good code quality enables better readability
Add Assertions
Improve code quality.
Improve tagging code. Add Ui.png
Duke Buddy
Duke Buddy helps you to remember and track tasks to complete so as to prevent you from signing extras.
Award-winning capabilities include:
Helps you to do guard dutyInterested to try it out? Follow the steps below.
Best part is its FREE!! 馃き
Versions:
Here's a sneak peak of it's
main
method: