87 lines
3.3 KiB
Plaintext
87 lines
3.3 KiB
Plaintext
Zum nachlesen.
|
|
|
|
Java OOP
|
|
Bro Code - Java Full course for free 2025
|
|
https://www.youtube.com/watch?v=xTtL8E4LzTQ
|
|
|
|
|
|
W3-Schools - Java Encapsulation
|
|
Get and Set
|
|
https://www.w3schools.com/java/java_encapsulation.asp
|
|
|
|
Code Gym - Get and Set
|
|
https://codegym.cc/de/groups/posts/getter-und-setter-in-java
|
|
|
|
Bro Code - How to read a File
|
|
https://www.youtube.com/watch?v=eHjbvgw4hsI
|
|
|
|
|
|
Baeldung - ConcurrentModificationException
|
|
https://www.baeldung.com/java-concurrentmodificationexception
|
|
|
|
Build an Online Shopping Cart System Using OOP in Java - Nakul Mitra
|
|
https://towardsdev.com/build-an-online-shopping-cart-system-using-oop-in-java-e8e5797f8664
|
|
|
|
|
|
Java application grocery ordering logic with OOP
|
|
https://stackoverflow.com/questions/63426789/java-application-grocery-ordering-logic-with-oop
|
|
|
|
Als vorlage für CartPos
|
|
|
|
|
|
isEmpty() W3-Schools
|
|
https://www.w3schools.com/java/ref_string_isempty.asp
|
|
|
|
KI
|
|
Prompt:
|
|
Ich stehe einwenig auf dem Schlauch, wie kann ich meine prodQuantity verändern sodass diese einen neuen wert bekommt?
|
|
public void updateProductQuantity(int prodID,int quantity) {
|
|
for (CartPosition pos : positions) {
|
|
if (quantity <= 0) {
|
|
removeProduct(prodID);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
Gemini Prompt: für ShippingCost
|
|
Für die Bestellung soll ein Brutto-Gesamtpreis aus den Kosten der Produkte sowie den Versandkosten berechnet werden.
|
|
Die enthaltene Mehrwertsteuer (korrekt eigentlich Umsatzsteuer) soll ebenfalls ausgewiesen werden.
|
|
Die Brutto-Versandkosten betragen bis (inkl.) 100 g 3,95 Euro bis 1 kg 4,95 Euro, bis 5 kg 5,95 Euro und darüber pauschal 19,95 Euro.
|
|
Ab einem Warenwert von 500 Euro (brutto) ist die Lieferung versandkostenfrei.
|
|
Wie bestimme ich die formel und bau das in meinen Java Online Text Shop mit ein, ich würde ungern blind alles copy pasten
|
|
|
|
Gemini Prompt: für Shipping Cost
|
|
|
|
Etwas kompliziert ist die
|
|
MwSt.-Berechnung für die Versandkosten, hier gilt, dass die MwSt. sich
|
|
nach den Versandkosten des Produkts bestimmt: Angenommen wir bestellen
|
|
nur eine Flasche Riesling, wären das Versandkosten von 5,95 brutto. Da
|
|
der Riesling einem MwSt.-Satz von 19% unterliegt, errechnet sich der
|
|
Nettopreis auf die Versandkosten aus 5,95 / 1,19 = 5 Euro, womit die
|
|
MwSt. 19 % beträgt.
|
|
Doch damit noch nicht genug, wenn
|
|
eine Lieferung nun bspw. Kosten von 100 Euro zu 7% MwSt. und 200 Euro zu
|
|
19% MwSt. enthält, muss die MwSt. der 19,95 Euro Versandkosten auch
|
|
anteilig nach dem Warenwert verteilt werden. Also 1/3 = 6,65 entfallen
|
|
auf 7% (Nettopreis VK: 6,65 / 1,07), 2/3 = 13,30 auf 19% (Nettopreis VK:
|
|
13,30 / 1,19).
|
|
|
|
erkläre mir wie ich das coden würde in java
|
|
|
|
Idee aus:
|
|
How to Create a Shipping Cost Calculator in Java - Stackoverflow
|
|
https://stackoverflow.com/questions/9013289/how-to-create-a-shipping-cost-calculator-in-java
|
|
|
|
|
|
Test Idee:
|
|
https://medium.com/@kingsleynwafor54/how-to-create-a-shopping-cart-api-using-java-with-unit-testing-ef51991e7cc
|
|
|
|
How to design the classes for a simple shopping cart example using Strategy Design Patterns
|
|
https://softwareengineering.stackexchange.com/questions/347505/how-to-design-the-classes-for-a-simple-shopping-cart-example-using-strategy-desi
|
|
|
|
Shopping Cart Java Application (addToCart)
|
|
https://stackoverflow.com/questions/18473130/shopping-cart-java-application-addtocart
|
|
|
|
Arrange,act, assert
|
|
https://java-design-patterns.com/patterns/arrange-act-assert/ |