From 7ff09c1e53a57cf5f97dcffa95672a450b012418 Mon Sep 17 00:00:00 2001 From: "Nicholas H." <3013379@stud.hs-mannheim.de> Date: Mon, 21 Oct 2024 12:59:03 +0200 Subject: [PATCH] Bestellung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eigene Klasse für jede Bestellung angelegt --- Bestellung.java | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Bestellung.java diff --git a/Bestellung.java b/Bestellung.java new file mode 100644 index 0000000..1cf3e79 --- /dev/null +++ b/Bestellung.java @@ -0,0 +1,50 @@ +import java.util.ArrayList; + +public class Bestellung { + public final static ArrayList bestellungen = new ArrayList<>(); + + + private Warenkorb warenkorb; + private String name; + private String anschrift; + private long bestelldatum; + + public Bestellung(Warenkorb warenkorb, long bestelldatum, String anschrift, String name) { + this.warenkorb = warenkorb; + this.bestelldatum = bestelldatum; + this.anschrift = anschrift; + this.name = name; + } + + public Warenkorb getWarenkorb() { + return warenkorb; + } + + public long getBestelldatum() { + return bestelldatum; + } + + public String getAnschrift() { + return anschrift; + } + + public String getName() { + return name; + } + + public void setWarenkorb(Warenkorb warenkorb) { + this.warenkorb = warenkorb; + } + + public void setBestelldatum(long bestelldatum) { + this.bestelldatum = bestelldatum; + } + + public void setAnschrift(String anschrift) { + this.anschrift = anschrift; + } + + public void setName(String name) { + this.name = name; + } +}