diff options
Diffstat (limited to 'src/com/mavlon/finances/Item.java')
-rw-r--r-- | src/com/mavlon/finances/Item.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/com/mavlon/finances/Item.java b/src/com/mavlon/finances/Item.java new file mode 100644 index 0000000..62794aa --- /dev/null +++ b/src/com/mavlon/finances/Item.java @@ -0,0 +1,48 @@ +package com.mavlon.finances; + +import java.io.Serializable; + +public class Item implements Serializable { + private String name; + private double cost; + + public Item() { + } + + public Item(String name) { + this.name = name; + } + + public Item(double cost) { + this.cost = cost; + } + + public Item(String name, double cost) { + this.name = name; + this.cost = cost; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getCost() { + return cost; + } + + public void setCost(double cost) { + this.cost = cost; + } + + @Override + public String toString() { + return "Item" + + "\nname = '" + name + '\'' + + "\ncost = " + cost + + '\n'; + } +} |