/* * @topic T11352 Cloneable class demo I * @brief Cloneable class Product -- shallow copy */ package products; public class Product implements Cloneable { int code; String description; double price; // constructors public Product( int code, String description, double price) { this.code = code; this.description = description; this.price = price; } // operations @Override public Object clone() throws CloneNotSupportedException { // Invokes Object.clone() return super.clone(); } public String getDescription() { return description; } public void setDescription( String descr ) { description = descr; } }//class Product