package domain; import java.io.Serializable; /** * An item to be managed by the shopping list. */ public class ShoppingItem implements Serializable { private String name; private String description; public ShoppingItem() { } public ShoppingItem(String name, String description) { this.name = name; this.description = description; } /** * @return The list item's description. */ public String getDescription() { return description; } /** * @param description The list item's description. */ public void setDescription(String description) { this.description = description; } /** * @return The list item's name. */ public String getName() { return name; } /** * @param name The list item's name (must be unique). */ public void setName(String name) { this.name = name; } @Override public String toString() { return "ShoppingItem{" + "name=" + name + ", description=" + description + '}'; } }