You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
878 B

package de.hs_fulda.ciip.projjpn;
public class Item {
// @ToDo: customerReview
private String productTitle;
private String description;
private int availability = 0;
private float price;
public Item() {
}
public Item(String titel,
String description,
int quantity,
float price) {
this.productTitle = titel;
this.description = description;
this.availability = quantity;
this.price = price;
}
public boolean inStock() {
return availability > 0;
}
public float getCurrentStock() {
return availability;
}
public void updateAvailability(int newAmount) {
availability = newAmount;
}
public void updatePrice(float price) {
this.price = price;
}
public float getCurrentPrice() {
return price;
}
public String getTitel() {
return this.productTitle;
}
public String getDescription() {
return this.description;
}
}