|
@ -1,13 +1,24 @@ |
|
|
package de.hs_fulda.ciip.projjpn; |
|
|
package de.hs_fulda.ciip.projjpn; |
|
|
|
|
|
|
|
|
public class Item { |
|
|
public class Item { |
|
|
|
|
|
|
|
|
private float price; |
|
|
|
|
|
// customerReview |
|
|
|
|
|
// productTitle |
|
|
|
|
|
// description |
|
|
|
|
|
// tags |
|
|
|
|
|
|
|
|
// @ToDo: customerReview |
|
|
|
|
|
private String productTitle; |
|
|
|
|
|
private String description; |
|
|
private int availability = 0; |
|
|
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() { |
|
|
public boolean inStock() { |
|
|
return availability > 0; |
|
|
return availability > 0; |
|
|