From 1e9ecee35581f80925cc7cb01ab774003500d8ce Mon Sep 17 00:00:00 2001 From: Ireozar Zareoto Date: Tue, 15 Oct 2024 06:17:06 +0200 Subject: [PATCH] cleanup signatures --- Technikladen/OrderSystem.java | 6 +++--- Technikladen/StorageManager.java | 4 ++-- Technikladen/TechStore.java | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Technikladen/OrderSystem.java b/Technikladen/OrderSystem.java index c111eac..5f08c11 100755 --- a/Technikladen/OrderSystem.java +++ b/Technikladen/OrderSystem.java @@ -3,9 +3,9 @@ import java.util.ArrayList; public class OrderSystem { private StorageManager systemManager; private ArrayList systemClients; - public OrderSystem(StorageManager manager, ArrayList clients) { + public OrderSystem(StorageManager manager) { this.systemManager = manager; - this.systemClients = clients; + this.systemClients = new ArrayList(); } public void addProduct(Product product) { this.systemManager.addProduct(product); @@ -52,4 +52,4 @@ public class OrderSystem { System.out.println("ID: " + product.getID() + ", Name: " + product.getName() + ", Price: " + product.getPrice() + ", Amount: " + product.getAmount()); } } -} \ No newline at end of file +} diff --git a/Technikladen/StorageManager.java b/Technikladen/StorageManager.java index 9771cad..c22eb41 100755 --- a/Technikladen/StorageManager.java +++ b/Technikladen/StorageManager.java @@ -2,8 +2,8 @@ import java.util.ArrayList; public class StorageManager { private ArrayList storageProducts; - public StorageManager(ArrayList products) { - this.storageProducts = products; + public StorageManager() { + this.storageProducts = new ArrayList; } public void addProduct(Product product) { this.storageProducts.add(product); diff --git a/Technikladen/TechStore.java b/Technikladen/TechStore.java index a11e42a..2883f58 100755 --- a/Technikladen/TechStore.java +++ b/Technikladen/TechStore.java @@ -1,4 +1,3 @@ -import java.util.ArrayList; import java.util.Scanner; public class TechStore { @@ -6,8 +5,8 @@ public class TechStore { System.out.print(input); } public static void main(String[] args) { - StorageManager manager = new StorageManager(new ArrayList()); - OrderSystem system = new OrderSystem(manager, new ArrayList()); + StorageManager manager = new StorageManager(); + OrderSystem system = new OrderSystem(manager); Scanner scnr = new Scanner(System.in); while (true) { p("\nInput mode: "); @@ -106,6 +105,3 @@ public class TechStore { } } } - - -