12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
-
- /**
- * Created by leon on 1/10/18.
- */
- public class Product {
- private String name;
- private double price;
- private int id;
- private int quantity;
-
- public Product(){
-
- }
-
- public Product(String name, int id){
- this.id = id;
- this.name = name;
- }
-
- public Product(String name, double price, int id, int quantity){
- this.name = name;
- this.price = price;
- this.id = id;
- this.quantity = quantity;
- }
-
- public void setName(String newName){
- name = newName;
- }
-
- public String getName(){
- return name;
- }
-
- public void setPrice(double newPrice){
- price = newPrice;
- }
-
- public double getPrice(){
- return price;
- }
-
- public void setID(int newID){
- id = newID;
- }
-
- public int getID(){
- return id;
- }
-
- public void setQuantity(int newQuantity){
- quantity = newQuantity;
- }
-
- public int getQuantity(){
- return quantity;
- }
- }
|