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