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

Add Damerau-Levenshtein distance and fixed a bug on parser #87

Merged

Conversation

JeffinsonDarmawan
Copy link

Fixed the bug on parser but have to remove arrow head style

@JeffinsonDarmawan JeffinsonDarmawan added type.Bug A bug priority.High Must do severity.High Bugs that affects most users and makes the app unusable labels Mar 30, 2024
@JeffinsonDarmawan JeffinsonDarmawan added this to the v2.0 milestone Mar 30, 2024
@JeffinsonDarmawan JeffinsonDarmawan self-assigned this Mar 30, 2024
Comment on lines +105 to +117
case ("remove"): // Fallthrough
case ("add"):
String[] arguments = new String[2];
String trimmedArgument = trimmedInput.substring(firstWhitespace).trim();
int secondWhitespace = trimmedArgument.indexOf(" ");
arguments[0] = FuzzyLogic.detectItem(trimmedArgument.substring(0,secondWhitespace));
arguments[1] = trimmedArgument.substring(secondWhitespace).trim();
outputs[1] = arguments[0] + " " + arguments[1];
break;
default:
outputs[1] = FuzzyLogic.detectItem(trimmedInput.substring(firstWhitespace).trim());
break;
}
Copy link

Choose a reason for hiding this comment

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

Good use of fall through to get rid of unnecessary repetition

System.out.println("Here are the list of your saved bouquets:");
System.out.println("Here is the list of your saved bouquets:");
Copy link

Choose a reason for hiding this comment

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

Good catch on the UI error!

@Ijaaz01 Ijaaz01 merged commit 5dd5baf into AY2324S2-CS2113-T11-3:master Apr 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do severity.High Bugs that affects most users and makes the app unusable type.Bug A bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants