|
|
@ -2,12 +2,12 @@ package de.hs_fulda.ciip.projjpn; |
|
|
|
|
|
|
|
public class Item { |
|
|
|
|
|
|
|
// price |
|
|
|
private int price; |
|
|
|
// customerReview |
|
|
|
// productTitle |
|
|
|
// description |
|
|
|
// tags |
|
|
|
int availability = 0; |
|
|
|
private int availability = 0; |
|
|
|
|
|
|
|
public boolean inStock() { |
|
|
|
return availability > 0; |
|
|
@ -16,4 +16,12 @@ public class Item { |
|
|
|
public void updateAvailability(int newAmount) { |
|
|
|
availability = newAmount; |
|
|
|
} |
|
|
|
|
|
|
|
public void updatePrice(int price) { |
|
|
|
this.price = price; |
|
|
|
} |
|
|
|
|
|
|
|
public int getCurrentPrice() { |
|
|
|
return price; |
|
|
|
} |
|
|
|
} |