package Objects; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class Product { String name; String store; String url; String updatedDate; float price; public Product(String name, String store, String url) { super(); this.name = name; this.store = store; this.url = url; } public String getName() { return name; } public String getStore() { return store; } public String getUrl() { return url; } public void setName(String name) { this.name = name; } public void setStore(String store) { this.store = store; } public void setUrl(String url) { this.url = url; } public String getUpdatedDate() { return updatedDate; } public void setUpdatedDate(String updatedDate) { this.updatedDate = updatedDate; } public void setUpdatedDate(LocalDateTime updatedDate) { this.updatedDate = updatedDate.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME); } public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } @Override public String toString() { return String.format("Store %s Product name %s price %s updates %s", store, name, price, updatedDate); } }