1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
-
- /**
- * Created by Mexi Liang 06/11/18
- */
- public class Product {
- private double price;
- private int id;
- private int quantity;
-
- public Product(){}
-
-
-
- public Product(int id,double price, int quantity){
- this.id =id;
- this.price = price;
- this.quantity = quantity;
-
- }
- public void setPrice(double newPrice){
- this.price = newPrice;
-
- }
-
- public double getPrice(){
- return price;
- }
-
- public void setId(int newId){
- this.id = newId;
- }
-
- public int getId(){
-
- return id;
- }
-
- public void setQuantity(Integer quantity){
- this.quantity = quantity;
- }
-
- public Integer getQuantity(){
-
- return quantity;
- }
-
- public String toString(){
-
- return Integer.toString(id) + " - "+ price + " - "+ quantity;
- }
-
- }
|