diff --git a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Item.java b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Item.java index 94570afd7da6f0ad659cd06fabd3b00b5cb1575c..ba80deff035caf2cdcc85c0947c1277c10aa6e54 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Item.java +++ b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Item.java @@ -70,7 +70,7 @@ public abstract class Item { */ public void setAmount(double amount) { if(amount <= 1.0f ) { - throw new IllegalArgumentException("A positive amount must be provided."); + throw new IllegalArgumentException("A positive amount must be provided"); } this.amount = amount; } diff --git a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/ItemOverview.java b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/ItemOverview.java index 85cda928a4cbbe95b8e9d36957e346a5a62da924..c16e963383002017965d13dc4787425cc97c9a38 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/ItemOverview.java +++ b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/ItemOverview.java @@ -3,7 +3,7 @@ package no.ntnu.idatt1002.demo.data.Economics; import java.util.ArrayList; /** - * ItemOverview is an abstract class for storing and getting + * ItemOverview is an abstract class for storing and getting. * information on items. Superclass for Income- and ExpenseOverview. */ public abstract class ItemOverview { @@ -17,8 +17,8 @@ public abstract class ItemOverview { } /** - * Class constructor that takes in an ArrayList of Item´s as argument - * @param items An ArrayList of the Item´s you want to overview + * Class constructor that takes in an ArrayList of Item´s as argument. + * @param items An ArrayList of the Item´s you want to overview. */ public ItemOverview(ArrayList<Item> items){ this.items = items; @@ -44,8 +44,8 @@ public abstract class ItemOverview { } /** - * Get the sum of all Item´s in items - * @return Sum of all Item´s + * Get the sum of all Item´s in items. + * @return Sum of all Item´s. */ public double getTotalSum(){ return items.stream().map(Item::getAmount).mapToDouble(Double::doubleValue).sum();