java.lang.Object
public class Store
A Store class which was specifically developed to demonstrate the use of an ArrayList of Product.
Constructor Summary | |
---|---|
Store(java.lang.String istoreLocation)
Constructor for objects of class Store |
Method Summary | |
---|---|
void |
add(Product product)
|
java.lang.String |
cheapestProduct()
|
Product |
get(int index)
|
java.util.ArrayList<Product> |
getProducts()
|
java.lang.String |
getStoreLocation()
|
java.lang.String |
listProducts()
|
void |
remove(int index)
|
void |
setProducts(java.util.ArrayList<Product> products)
|
void |
setStoreLocation(java.lang.String storeLocation)
|
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Store(java.lang.String istoreLocation)
storeLocation
- The city where the specific store is locatedMethod Detail |
---|
public void add(Product product)
public java.lang.String cheapestProduct()
public Product get(int index)
public java.util.ArrayList<Product> getProducts()
public java.lang.String getStoreLocation()
public java.lang.String listProducts()
public void remove(int index)
public void setProducts(java.util.ArrayList<Product> products)
public void setStoreLocation(java.lang.String storeLocation)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object