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

[CHEN ZIHAN] ip #198

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

[CHEN ZIHAN] ip #198

wants to merge 34 commits into from

Conversation

ZIZI-czh
Copy link

@ZIZI-czh ZIZI-czh commented Jan 31, 2023

this up to level 2

Copy link

@stevenantya stevenantya left a comment

Choose a reason for hiding this comment

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

Overall good job on the pull request! Only few minor consistency and coding standards issues.

}



Choose a reason for hiding this comment

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

remove the unnecessary blank spaces, follow one uniform spacing




public static void add() {

Choose a reason for hiding this comment

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

Coding Standard violation: Ambiguity of function.

Can change the name of the function to explain more. e.g. addTodo()


public static void add() {
boolean isByeEntered = true;
String outputs;

Choose a reason for hiding this comment

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

Coding Standard Violation: Plural form is reserved for collections of objects.

Suggested change
String outputs;
String output

public static void add() {
boolean isByeEntered = true;
String outputs;
String[] storeList;

Choose a reason for hiding this comment

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

Coding Standard Violation: Array should be plural

Suggested change
String[] storeList;
String[] storeLists;

System.out.println("Bye. Hope to see you again soon!");
return;
}else{
System.out.println(outputs);
} else if(outputs.equals("list")){

Choose a reason for hiding this comment

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

Coding Standard Violation: Give space before and after statement

Suggested change
} else if(outputs.equals("list")){
} else if(outputs.equals("list")) {

Choose a reason for hiding this comment

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

same goes for line 30, 35

Copy link

@kairuler kairuler left a comment

Choose a reason for hiding this comment

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

Overall, I like how your code is quite clean and you adhered to coding standards most of the time! I noticed some variable names and spacing that you may have unintentionally overlooked but they are just minor errors. Good job!


boolean isByeEntered = true;
String outputs;
public static final int MAX_INT = 100;
Copy link

Choose a reason for hiding this comment

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

Nice! I like your usage of constants (instead of magic numbers) and I like how they are typed (all uppercase, underscore to separate words).



public static void add() {
boolean isByeEntered = true;
Copy link

Choose a reason for hiding this comment

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

Could isByeEntered be named to sound more like a boolean variable? It is a bit confusing what isByeEntered does just based off its name 😁 .

if(list!=null) {
System.out.println(a + ". " + list);
a++;
}else{
Copy link

Choose a reason for hiding this comment

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

Spacing is sometimes inconsistent (maybe by accident?). Here, }else{ has no spaces between the braces but elsewhere, there are spaces. I noticed this a few times in the above code too. Be sure to double check!

public static void add() {
boolean isByeEntered = true;
String outputs;
String[] storeList;
Copy link

Choose a reason for hiding this comment

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

I like how your array specifier is attached to the type and not the variable 👍 nice

String[] storeList;
storeList = new String[MAX_INT];
int i = 0;
int a = 1;
Copy link

Choose a reason for hiding this comment

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

I wasn't sure on what a did until I read the code fully... I think changing the variable name a could make it more understandable for readers!

case "Bye":
System.out.println("Bye. Hope to see you again soon!");
isByeEnter = true;
break;

Choose a reason for hiding this comment

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

Please separate into different methods to handle different commands, such as displayAllTasks(), UnmarkTask() etc.

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