Fertigstellung der Änderungen am Warenkorb
parent
2792a1d5d1
commit
5a7c84a1cf
|
|
@ -74,7 +74,7 @@ public class OnlineShop {
|
||||||
System.out.println("Der aktuelle Warenkorb sieht so aus: ");
|
System.out.println("Der aktuelle Warenkorb sieht so aus: ");
|
||||||
String[] arrayMengeundProdukte = warenkorb.ausgabe();
|
String[] arrayMengeundProdukte = warenkorb.ausgabe();
|
||||||
for (int i = 0; i < arrayMengeundProdukte.length / 2; i++) {
|
for (int i = 0; i < arrayMengeundProdukte.length / 2; i++) {
|
||||||
System.out.print(arrayMengeundProdukte[i] + " Stück | " + arrayMengeundProdukte[i+arrayMengeundProdukte.length/2]);
|
System.out.print(arrayMengeundProdukte[i] + " Stück | " + arrayMengeundProdukte[i+arrayMengeundProdukte.length/2] + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@ public class OnlineShop {
|
||||||
}
|
}
|
||||||
warenkorbAusgabe();
|
warenkorbAusgabe();
|
||||||
while(true) {
|
while(true) {
|
||||||
System.out.println("\n \n Möchten Sie weitere Änderungen vornehmen?(1=Ja, 2=Nein: ");
|
System.out.println("\n \n Möchten Sie weitere Änderungen vornehmen?(1=Ja, 2=Nein): ");
|
||||||
int auswahlNeu = scanner.nextInt();
|
int auswahlNeu = scanner.nextInt();
|
||||||
if (auswahlNeu == 1) {
|
if (auswahlNeu == 1) {
|
||||||
warenkorbÄnderungen(auswahl);
|
warenkorbÄnderungen(auswahl);
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,14 @@ import java.util.Scanner;
|
||||||
public class ShopTUI {
|
public class ShopTUI {
|
||||||
public static OnlineShop shop;
|
public static OnlineShop shop;
|
||||||
public static void main(String[] args) throws FileNotFoundException {
|
public static void main(String[] args) throws FileNotFoundException {
|
||||||
System.out.println("Willkommen im Lewandowski Store!");
|
System.out.println("Willkommen im Lewandowski Store!\n \n");
|
||||||
shop = new OnlineShop();
|
shop = new OnlineShop();
|
||||||
produktangebot();
|
produktangebot();
|
||||||
hauptmenu();
|
hauptmenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void hauptmenu() throws FileNotFoundException {
|
public static void hauptmenu() throws FileNotFoundException {
|
||||||
System.out.println("Was möchten Sie tun?");
|
System.out.println("Was möchten Sie tun? \n(1=Produktsuche, 2=Warenkorbanzeige, 3=Bestellung abschließen, 0=Programm beenden): ");
|
||||||
System.out.println("(1=Produktsuche, 2=Warenkorbanzeige, 3=Bestellung abschließen, 0=Programm beenden): ");
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue