market.statistics
Class EvaluateStatistics
java.lang.Object
|
+--market.statistics.EvaluateStatistics
- public class EvaluateStatistics
- extends Object
Does calculation on statistics. While Statistics.getArticleStats(String, int, int, int, int)
sums up all prices and concatenates all history lists, this class cleans up
the lists and provides methods to evaluate the statistics.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EvaluateStatistics
public EvaluateStatistics(CISalesStats ciss)
- Parameters:
ciss
- the history item to be evaluated.
getPriceHistory
public List getPriceHistory()
getOrderHistory
public List getOrderHistory()
getAveragePrice
public int getAveragePrice()
- Returns:
- the average price of the article.
getRevenue
public int getRevenue()
getAmount
public int getAmount()
getAverageItemsSold
public double getAverageItemsSold()
- Returns:
- the average of sold items per day.
getAverageOrderAmount
public double getAverageOrderAmount()
- Returns:
- the average of items ordered per order.
getAverageDaysBetweenOrders
public double getAverageDaysBetweenOrders()
- Returns:
- the average days between two orders of the appropriate item.