dghf
JCHJava Community | Help. Code. Learn.
•Created by dghf on 3/2/2024 in #java-help
I need to rewrite this Java code while retaining same functionality
bump
7 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 3/2/2024 in #java-help
I need to rewrite this Java code while retaining same functionality
Does this achieve the same thing?
7 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 3/2/2024 in #java-help
I need to rewrite this Java code while retaining same functionality
Any advice
7 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
And I don't know what lambda exp. is
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
Multithreading is for next asssignment
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
in which file?
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
but i want it to be functionally the same, that's to say it should work
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
which one are you talking about now
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
but apart from the comments
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
yeah
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
Is this better?
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 2/24/2024 in #java-help
Can my code be improved?
@Code@szatkus@HAO@tjoener
34 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 6/4/2023 in #java-help
Need help with Strategy pattern for discounts in POS system
But I am not sure if that'd break encapsulation or violate OOP principles and bring bad code smells
23 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 6/4/2023 in #java-help
Need help with Strategy pattern for discounts in POS system
So I'd have to move the createSaleAndApplyDiscount method from the Controller class to the View class, and call it after adding the products to the sale?
So
23 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 6/4/2023 in #java-help
Need help with Strategy pattern for discounts in POS system
You think the issue is that
createSaleAndApplyDiscount
creates an empty sale and doesn't add any products to it?23 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 6/4/2023 in #java-help
Need help with Strategy pattern for discounts in POS system
The code that calculates the discount is in the Sale class, in the applyDiscount method. Here is the code:
23 replies
JCHJava Community | Help. Code. Learn.
•Created by dghf on 6/4/2023 in #java-help
Need help with Strategy pattern for discounts in POS system
This is my entire code
23 replies