awesome-low-level-design
awesome-low-level-design copied to clipboard
JAVA: No amount validation in Vending Machine example
In the dispenseProduct() method there is no validation if the amount vending machine contains is greater than or equal to the price of selected item.
I can make a fix for this if assigned to me.
Error Line - https://github.com/ashishps1/awesome-low-level-design/blob/5cbc40df46e17bad34f99e7483b001aa50bf69fb/solutions/java/src/vendingmachine/DispenseState.java#L27
Similar Implementation of mine - https://github.com/Ankitcode99/Design-Patterns/blob/main/src/main/java/org/ankitcode99/statePattern/stateImplementation/SelectionState.java#L45
@ashishps1 can I work on this issue?