Class Store

java.lang.Object
  
public class Store
extends java.lang.Object

A Store class which was specifically developed to demonstrate the use of an ArrayList of Product.

Version:
1.0
Author:
Siobhan Drohan

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

Store

public Store(java.lang.String istoreLocation)
Constructor for objects of class Store

Parameters:
storeLocation - The city where the specific store is located
Method Detail

add

public void add(Product product)

cheapestProduct

public java.lang.String cheapestProduct()

get

public Product get(int index)

getProducts

public java.util.ArrayList<Product> getProducts()

getStoreLocation

public java.lang.String getStoreLocation()

listProducts

public java.lang.String listProducts()

remove

public void remove(int index)

setProducts

public void setProducts(java.util.ArrayList<Product> products)

setStoreLocation

public void setStoreLocation(java.lang.String storeLocation)

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object