From fdb1719171b8ea89e88dfedf161e28343b542a1a Mon Sep 17 00:00:00 2001 From: ibartkowski Date: Mon, 14 Oct 2024 19:07:17 +0200 Subject: [PATCH] Update Technikladen/Product.java Removed package line --- Technikladen/Product.java | 70 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/Technikladen/Product.java b/Technikladen/Product.java index 56adbda..3471cd3 100755 --- a/Technikladen/Product.java +++ b/Technikladen/Product.java @@ -1,36 +1,34 @@ -package tech_store; - -public class Product { - private int productID; - private String productName; - private int productPrice; - private int productAmount; - public Product(int id, String name, int price, int amt) { - this.productID = id; - this.productName = name; - this.productPrice = price; - this.productAmount = amt; - } - public int getID() { - return this.productID; - } - public String getName() { - return this.productName; - } - public int getPrice() { - return this.productPrice; - } - public int getAmount() { - return this.productAmount; - } - public void reduceAmount(int amt) { - if (this.productAmount < amt) { - System.out.println("Not enough of product " + this.productID + "(" + this.productName + ") available!"); - return; - } - this.productAmount -= amt; - } - public void increaseAmount(int amt) { - this.productAmount += amt; - } -} +public class Product { + private int productID; + private String productName; + private int productPrice; + private int productAmount; + public Product(int id, String name, int price, int amt) { + this.productID = id; + this.productName = name; + this.productPrice = price; + this.productAmount = amt; + } + public int getID() { + return this.productID; + } + public String getName() { + return this.productName; + } + public int getPrice() { + return this.productPrice; + } + public int getAmount() { + return this.productAmount; + } + public void reduceAmount(int amt) { + if (this.productAmount < amt) { + System.out.println("Not enough of product " + this.productID + "(" + this.productName + ") available!"); + return; + } + this.productAmount -= amt; + } + public void increaseAmount(int amt) { + this.productAmount += amt; + } +}