51 lines
862 B
Java
51 lines
862 B
Java
|
package example.model;
|
||
|
|
||
|
public class Computer {
|
||
|
private int id;
|
||
|
private String name;
|
||
|
private Double price;
|
||
|
private int stock;
|
||
|
|
||
|
public Computer() {
|
||
|
}
|
||
|
|
||
|
public Computer(int id, String name, Double price, int stock) {
|
||
|
this.id = id;
|
||
|
this.name = name;
|
||
|
this.price = price;
|
||
|
this.stock = stock;
|
||
|
}
|
||
|
|
||
|
public int getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public void setId(int id) {
|
||
|
this.id = id;
|
||
|
}
|
||
|
|
||
|
public String getName() {
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
public void setName(String name) {
|
||
|
this.name = name;
|
||
|
}
|
||
|
|
||
|
public Double getPrice() {
|
||
|
return price;
|
||
|
}
|
||
|
|
||
|
public void setPrice(Double price) {
|
||
|
this.price = price;
|
||
|
}
|
||
|
|
||
|
public int getStock() {
|
||
|
return stock;
|
||
|
}
|
||
|
|
||
|
public void setStock(int stock) {
|
||
|
this.stock = stock;
|
||
|
}
|
||
|
}
|