From a5fea776498c76bc47fba1db17a081419fc432e6 Mon Sep 17 00:00:00 2001 From: ibartkowski Date: Mon, 14 Oct 2024 19:08:10 +0200 Subject: [PATCH] Update Technikladen/StorageManager.java Removed package line --- Technikladen/StorageManager.java | 52 +++++++++++++++----------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/Technikladen/StorageManager.java b/Technikladen/StorageManager.java index ea4a4e5..9771cad 100755 --- a/Technikladen/StorageManager.java +++ b/Technikladen/StorageManager.java @@ -1,27 +1,25 @@ -package tech_store; - -import java.util.ArrayList; - -public class StorageManager { - private ArrayList storageProducts; - public StorageManager(ArrayList products) { - this.storageProducts = products; - } - public void addProduct(Product product) { - this.storageProducts.add(product); - } - public ArrayList getStorage() { - return this.storageProducts; - } - public void increaseStorage(int id, int amt) { - this.getProductByID(id).increaseAmount(amt); - } - public Product getProductByID(int id) { - for (Product product : this.storageProducts) { - if (product.getID() == id) { - return product; - } - } - return new Product(-1, "", 0, 0); - } -} +import java.util.ArrayList; + +public class StorageManager { + private ArrayList storageProducts; + public StorageManager(ArrayList products) { + this.storageProducts = products; + } + public void addProduct(Product product) { + this.storageProducts.add(product); + } + public ArrayList getStorage() { + return this.storageProducts; + } + public void increaseStorage(int id, int amt) { + this.getProductByID(id).increaseAmount(amt); + } + public Product getProductByID(int id) { + for (Product product : this.storageProducts) { + if (product.getID() == id) { + return product; + } + } + return new Product(-1, "", 0, 0); + } +}