Skip to content

Conversation

@Mykyta-Panchenko
Copy link

Description:

Moved drink price calculation to getDrinkPrice() method.
Moved ingredient prices to a Map<String, Integer> for better readability.
Replaced string comparisons using == with .equals() to prevent potential bugs.
Extracted student discount logic into isEligibleForStudentDiscount() method.
Closes #3

Description:

Moved drink price calculation to getDrinkPrice() method.
Moved ingredient prices to a Map<String, Integer> for better maintainability.
Fixed string comparison issues by replacing == with .equals().
Moved student discount logic to isEligibleForStudentDiscount() method.
Closes nerdschoolbergen#3
Description:

Moved drink price calculation to getDrinkPrice() method.
Moved ingredient prices to a Map<String, Integer> for better readability.
Replaced string comparisons using == with .equals() to prevent potential bugs.
Extracted student discount logic into isEligibleForStudentDiscount() method.
Closes nerdschoolbergen#3
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.

Code smells Magic Numbers

1 participant