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'; } }