From 7e70b2bc8cd07a3ebabcb7c1af4501d85ee8e1f6 Mon Sep 17 00:00:00 2001 From: Boshan Chen <boschen@uw.edu> Date: Mon, 12 Feb 2024 23:26:47 -0800 Subject: [PATCH] 2nd from boschen --- Product.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Product.java diff --git a/Product.java b/Product.java new file mode 100644 index 0000000..44a5ca9 --- /dev/null +++ b/Product.java @@ -0,0 +1,39 @@ +public class Product { + public String name; + public String description; + public String picture; + public String altText; + public double price; + + public Product(String name, String description, String picture, String altText, double price) { + this.name = name; + this.description = description; + this.picture = picture; + this.altText = altText; + this.price = price; + } + + public String getName() { + return this.name; + } + + public String getAltText() { + return this.altText; + } + + public String getDescription() { + return this.description; + } + + public String getPicture() { + return this.picture; + } + + public double getPrice() { + return this.price; + } + + public String toString() { + return "Product"; + } +} -- GitLab