Product.java 549B

1234567891011121314151617181920212223242526272829303132333435363738
  1. public class Product {
  2. int quantity;
  3. String id;
  4. double price;
  5. public Product(){
  6. quantity = -1;
  7. id = null;
  8. price = -1;
  9. }
  10. public int getQuantity(){
  11. return quantity;
  12. }
  13. public void setQuantity(int number){
  14. this.quantity = quantity+number;
  15. }
  16. public String getId(){
  17. return id;
  18. }
  19. public void setId(){
  20. this.id = id;
  21. }
  22. public double getPrice(){
  23. return price;
  24. }
  25. public void setPrice(){
  26. this.price = price;
  27. }
  28. }