diff --git a/src/main/java/org/example/Product.java b/src/main/java/org/example/Product.java new file mode 100644 index 0000000..e082bd2 --- /dev/null +++ b/src/main/java/org/example/Product.java @@ -0,0 +1,24 @@ +package org.example; + +public class Product { + + String name; + float weight; + float price; + float vatPortion; + + public Product(String name, float weight, float price, float vatPortion) { + this.name = name; + this.weight = weight; + this.price = price; + this.vatPortion = vatPortion; + } + + public float getPriceWithVat() { + return price + getVat(); + } + + public float getVat() { + return price * vatPortion; + } +}