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 int id;
|
||||||
public Warenkorb bestellungen;
|
public Warenkorb bestellungen;
|
||||||
public Boolean storniert;
|
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) {
|
public void StorniereBestellung(Warenkorb storniert) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,9 @@ package backend;
|
||||||
public class Kunde {
|
public class Kunde {
|
||||||
public String name;
|
public String name;
|
||||||
public String Adresse;
|
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 Warenkorb aktuellerWarenkorb;
|
||||||
|
|
||||||
public OnlineShop() {
|
public OnlineShop() {
|
||||||
lager = new ArrayList<Produkt>();
|
this.lager = new ArrayList<Produkt>();
|
||||||
bestellungen = new ArrayList<Bestellung>();
|
this.bestellungen = new ArrayList<Bestellung>();
|
||||||
aktuellerWarenkorb = new Warenkorb();
|
this.aktuellerWarenkorb = new Warenkorb();
|
||||||
};
|
};
|
||||||
|
|
||||||
public void AddProdukt(Produkt neu){
|
public void AddProdukt(Produkt neu){
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,15 @@ public class Produkt {
|
||||||
public int netto;
|
public int netto;
|
||||||
public int mwStSatz;
|
public int mwStSatz;
|
||||||
public int lagerbestand;
|
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) {
|
public void UpdateProdukt(Produkt update) {
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@ public class Warenkorb {
|
||||||
public ArrayList<Produkt> inhalt;
|
public ArrayList<Produkt> inhalt;
|
||||||
public ArrayList<Integer> anzahl;
|
public ArrayList<Integer> anzahl;
|
||||||
public Kunde kunde;
|
public Kunde kunde;
|
||||||
|
|
||||||
|
public Warenkorb(Kunde kunde) {
|
||||||
|
this.inhalt = new ArrayList<Produkt>();
|
||||||
|
this.anzahl = new ArrayList<Integer>();
|
||||||
|
this.kunde = kunde;
|
||||||
|
};
|
||||||
|
|
||||||
public int NettoPreis(){
|
public int NettoPreis(){
|
||||||
return 0;};
|
return 0;};
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,9 @@ https://app.diagrams.net/#Uhttps%3A%2F%2Fgitty.informatik.hs-mannheim.de%2F30292
|
||||||
Or download and open it with drawio.
|
Or download and open it with drawio.
|
||||||
|
|
||||||
Time Chart:
|
Time Chart:
|
||||||
|
|
||||||
1:40 for UML and understanding of the Exercise
|
1:40 for UML and understanding of the Exercise
|
||||||
|
|
||||||
0:40 for Creating Java project with UML defined Classes.
|
0:40 for Creating Java project with UML defined Classes.
|
||||||
|
|
||||||
|
0:06 creating constructors
|
||||||
Loading…
Reference in New Issue