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

[Mohamed Nizar Bin Mohamed Hussain] iP #69

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

Conversation

NizarMohd
Copy link

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
Copy link

@itskesin itskesin left a comment

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]

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

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());

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

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 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

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 on lines 148 to 152
String banner = "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
Copy link

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 on lines 141 to 142
default:
status = -1;
Copy link

@itskesin itskesin Feb 4, 2020

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."

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

@itskesin itskesin Feb 4, 2020

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