create constructors
parent
3c23864a81
commit
0ef1667de0
|
|
@ -1 +1,3 @@
|
|||
OnlineShop/.settings/*
|
||||
OnlineShop/.settings/*
|
||||
*.bkp
|
||||
*.dtmp
|
||||
|
|
@ -4,6 +4,18 @@ public class Bestellung {
|
|||
public int id;
|
||||
public Warenkorb bestellungen;
|
||||
public Boolean storniert;
|
||||
|
||||
public Bestellung(int id, Warenkorb bestellungen) {
|
||||
this.id = id;
|
||||
this.bestellungen = bestellungen;
|
||||
this.storniert = false;
|
||||
};
|
||||
|
||||
public Bestellung(int id, Warenkorb bestellungen, Boolean storniert) {
|
||||
this.id = id;
|
||||
this.bestellungen = bestellungen;
|
||||
this.storniert = storniert;
|
||||
};
|
||||
|
||||
public void StorniereBestellung(Warenkorb storniert) {
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,9 @@ package backend;
|
|||
public class Kunde {
|
||||
public String name;
|
||||
public String Adresse;
|
||||
|
||||
public Kunde(String name, String Adresse) {
|
||||
this.name = name;
|
||||
this.Adresse = Adresse;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ public class OnlineShop {
|
|||
public Warenkorb aktuellerWarenkorb;
|
||||
|
||||
public OnlineShop() {
|
||||
lager = new ArrayList<Produkt>();
|
||||
bestellungen = new ArrayList<Bestellung>();
|
||||
aktuellerWarenkorb = new Warenkorb();
|
||||
this.lager = new ArrayList<Produkt>();
|
||||
this.bestellungen = new ArrayList<Bestellung>();
|
||||
this.aktuellerWarenkorb = new Warenkorb();
|
||||
};
|
||||
|
||||
public void AddProdukt(Produkt neu){
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@ public class Produkt {
|
|||
public int netto;
|
||||
public int mwStSatz;
|
||||
public int lagerbestand;
|
||||
|
||||
public Produkt(int id, String name, int transportGewicht, int netto, int mwStSatz, int lagerbestand) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.transportGewicht = transportGewicht;
|
||||
this.netto = netto;
|
||||
this.mwStSatz = mwStSatz;
|
||||
this.lagerbestand = lagerbestand;
|
||||
};
|
||||
|
||||
public void UpdateProdukt(Produkt update) {
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ public class Warenkorb {
|
|||
public ArrayList<Produkt> inhalt;
|
||||
public ArrayList<Integer> anzahl;
|
||||
public Kunde kunde;
|
||||
|
||||
public Warenkorb(Kunde kunde) {
|
||||
this.inhalt = new ArrayList<Produkt>();
|
||||
this.anzahl = new ArrayList<Integer>();
|
||||
this.kunde = kunde;
|
||||
};
|
||||
|
||||
public int NettoPreis(){
|
||||
return 0;};
|
||||
|
|
|
|||
Loading…
Reference in New Issue