Skip to content

[Mohamed Nizar Bin Mohamed Hussain] iP - #69

Open
NizarMohd wants to merge 97 commits into
nus-cs2113-AY1920S2:masterfrom
NizarMohd:master
Open

[Mohamed Nizar Bin Mohamed Hussain] iP#69
NizarMohd wants to merge 97 commits into
nus-cs2113-AY1920S2:masterfrom
NizarMohd:master

Conversation

@NizarMohd

Copy link
Copy Markdown

No description provided.

j-lum and others added 16 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
The OpenJFX plugin expects applications to be modular and bundled
with jlink, resulting in fat jars that are not cross-platform. Let's
manually include the required dependencies so that shadow can package
them properly.
@NizarMohd NizarMohd changed the title Mohamed Nizar Bin Mohamed Hussain [Mohamed Nizar Bin Mohamed Hussain] iP Feb 1, 2020

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

All the best for your IP ;-)
Overall, we found your code easy to read.
[Also took part in this review: @NyanWunPaing]

Comment thread src/main/java/Duke.java Outdated
for (i = 0; i < l1.size(); i++) {
int count = i + 1;
Task temp = l1.get(i);
System.out.println("\t " + count +"."+ temp.getTaskDescription().trim());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't the spaces between the string and operator be more consistent ? 🤔
System.out.println("\t " + count + "." + temp.getTaskDescription().trim());

Comment thread src/main/java/Duke.java Outdated
System.out.println("\t Nice! I've marked this task as done:");
System.out.println("\t "+tempTask.getTaskDescription());
System.out.println(LINE);
}else{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

shouldnt this be
} else {
🤔

Comment thread src/main/java/Duke.java Outdated
Comment on lines +78 to +88
String[] temp=getCommand(userIn);
String action="";
boolean flip=false;
for(int i=1; i<(temp.length); i++) {
if (temp[i].charAt(0) == '/') {
flip=true;
}
if(flip){
timing += temp[i] + " ";
}else{
action += temp[i] + " ";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't there be spaces before and after the equal sign? It is good to be consistent..

Comment thread src/main/java/Duke.java Outdated
Comment on lines +148 to +152
String banner = "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Make this a constant like the constant LINE?

Comment thread src/main/java/Duke.java Outdated
Comment on lines +141 to +142
default:
status = -1;

@itskesin itskesin Feb 4, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe include a break or //Fallthrough in the default case? 💭
This is recorded in the coding standard:
"The explicit //Fallthrough comment should be included whenever there is a case statement without a break statement."

Comment thread src/main/java/Duke.java Outdated

public class Duke {
public static final String LINE = "\t__________________________________________________________";
public static final String[] COMMAND= {"todo", "deadline", "event", "done", "bye", "help"};

@itskesin itskesin Feb 4, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe you can define an enumeration type call Command that has six values TODO, DEADLINE, EVENT, DONE, BYE, HELP?

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.

4 participants