Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package domain;
- import java.io.Serializable;
- public class Product implements Serializable {
- private String productID;
- private String productName;
- private String productDescription;
- private float weight;
- private float cost;
- /**
- * Full arg constructor; creates a Product with all the information supplied
- *
- * @param productID
- * @param productName
- * @param productDescription
- * @param weight
- * @param cost
- */
- public Product(String productID, String productName, String productDescription, float weight, float cost) {
- this.productID = productID;
- this.productName = productName;
- this.productDescription = productDescription;
- this.weight = weight;
- this.cost = cost;
- }
- /**
- * No arg constructor
- */
- public Product() {
- }
- /**
- * Getter
- *
- * @return
- */
- public String getProductID() {
- return productID;
- }
- /**
- * Setter
- *
- * @param productID
- */
- public void setProductID(String productID) {
- this.productID = productID;
- }
- /**
- * Getter
- *
- * @return
- */
- public String getProductName() {
- return productName;
- }
- /**
- * Setter
- *
- * @param productID
- */
- public void setProductName(String productName) {
- this.productName = productName;
- }
- /**
- * Getter
- *
- * @return
- */
- public String getProductDescription() {
- return productDescription;
- }
- /**
- * Setter
- *
- * @param productID
- */
- public void setProductDescription(String productDescription) {
- this.productDescription = productDescription;
- }
- /**
- * Getter
- *
- * @return
- */
- public float getWeight() {
- return weight;
- }
- /**
- * Setter
- *
- * @param productID
- */
- public void setWeight(float weight) {
- this.weight = weight;
- }
- /**
- * Getter
- *
- * @return
- */
- public float getCost() {
- return cost;
- }
- /**
- * Setter
- *
- * @param productID
- */
- public void setCost(float cost) {
- this.cost = cost;
- }
- /**
- * I wonder what this does >.>
- *
- * @return
- */
- @Override
- public String toString() {
- return "Product: " + productID + " " + productName + " " + productDescription + " " + weight + " " + cost;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement