/** * Created by leon on 1/10/18. */ public class Product { private double price; private int quantity; private int id; public Product(){} public Product(int productId, double price,int quantity){ this.id = id; this.price = price; this.quantity = quantity; } public void setPrice(double newPrice) { this.price = newPrice; } public double getPrice() { return price; } public void setQuantity(int newQuantity){ this.quantity = newQuantity; } public int getQuantity() { return quantity; } public void setId(int productId) { this.id = productId; } public int getId() { return id; } public String toString() { return Integer.toString(id) + " - " + price + " - " + quantity; } }