Advertisement
Dakpluto

Product.java

Aug 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.29 KB | None | 0 0
  1. import java.math.BigDecimal;
  2. import java.util.Date;
  3.  
  4. public class Product {
  5.     private String name;
  6.     private Date date;
  7.     private int quantity;
  8.     private BigDecimal price;
  9.     private Manufacturer manufacturer;
  10.  
  11.     public Product(String name, Date date, int quantity, BigDecimal price, Manufacturer manufacturer) {
  12.         super();
  13.         this.name = name;
  14.         this.date = date;
  15.         this.quantity = quantity;
  16.         this.price = price;
  17.         this.manufacturer = manufacturer;
  18.     }
  19.  
  20.     public String getName() {
  21.         return name;
  22.     }
  23.  
  24.     public void setName(String name) {
  25.         this.name = name;
  26.     }
  27.  
  28.     public Date getDate() {
  29.         return date;
  30.     }
  31.  
  32.     public void setDate(Date date) {
  33.         this.date = date;
  34.     }
  35.  
  36.     public int getQuantity() {
  37.         return quantity;
  38.     }
  39.  
  40.     public void setQuantity(int quantity) {
  41.         this.quantity = quantity;
  42.     }
  43.  
  44.     public BigDecimal getPrice() {
  45.         return price;
  46.     }
  47.  
  48.     public void setPrice(BigDecimal price) {
  49.         this.price = price;
  50.     }
  51.  
  52.     public Manufacturer getManufacturer() {
  53.         return manufacturer;
  54.     }
  55.  
  56.     public void setManufacturer(Manufacturer manufacturer) {
  57.         this.manufacturer = manufacturer;
  58.     }
  59.  
  60.     @Override
  61.     public String toString() {
  62.         return "Product [name=" + name + ", date=" + date + ", quantity=" + quantity + ", price=" + price
  63.                 + ", manufacturer=" + manufacturer + "]";
  64.     }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement