Advertisement
techno-

Product.java

Nov 23rd, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. package e1;
  2.  
  3. public class Product {
  4.     private int id;
  5.     private int stock;
  6.  
  7.     public Product(int id, int stock) {
  8.         this.id = id;
  9.         this.stock = stock;
  10.     }
  11.  
  12.     public int getId() {
  13.         return id;
  14.     }
  15.  
  16.     public void setId(int id) {
  17.         this.id = id;
  18.     }
  19.  
  20.     public int getStock() {
  21.         return stock;
  22.     }
  23.  
  24.     public void setStock(int stock) {
  25.         this.stock = stock;
  26.     }
  27. }
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement