// stats.h: the Statistics class, for objects that collect statistics.
// (There is only one such object in this program.)
// (modified)

#ifndef _STATISTICS_H
#define _STATISTICS_H

// CODE: you may have to add varibles to this class and change statistics
//       collection methods in order to support additional statistics. 

class Statistics {
private:
   int totalArrivals;
   int customersServed;
   double totalItemsSold;
   double totalWaitingTime;
   double totalServiceTime;

public:

   // Constructor.
   // The list of "name (value)" pairs after the colon and before the
   // constructor body provides initial values for those data members.
   Statistics () : totalArrivals (0), customersServed (0), 
     totalItemsSold (0), totalWaitingTime (0), totalServiceTime (0) {}


   // accumSale: record and count a sale.
   void accumSale (double items);

   // accumServiceTime: record a customer's service time.
   void accumServiceTime (double interval);

   // accumWaitingTime: record a customer's waiting time.
   void accumWaitingTime (double interval);

   // countArrival: record an arrival.
   void countArrival ();

   // Print stat snapshot headers
   static void printHeaders ();

   // snapshot: print a summary of the statistics so far.
   void snapshot ();
};

#endif
