View Single Post
Old 12-17-2003, 01:40 PM   #24 (permalink)
dimbulb
Riiiiight........
 
PHP Code:
#ifndef CUSTOMER_H
#define CUSTOMER_H
//---------------------------------------------
//File:Customer Class Definition
//Models a generic customer for queing networks
//---------------------------------------------

class Customer {

      public:
             
//Constructor for Customer, initializes its ID#
             
Customer();
             
Customer(double newAttrint newIDdouble newWork,int newArrivalP);
             
int GetArrivalPeriod(double periodLength);
             
//attribute--can be used to store any value
             
double attribute;

            
//ID number for this object
            
int ID;
            
            
//workload for customer, assigned on arrival
            
double workload;
            
int arrivalPeriod//period that customer arrives in

};

//-------MEMBER FUNCTIONS--------------------------------------------

///Constructor
Customer::Customer()
{

        
attribute=0;  //set to 0 for now
        
ID=-1//give this Customer a dummy ID
        
workload 0;   //set to 0 for now
}
Customer::Customer(double newAttrint newIDdouble newWorkint newArrivalP){
    
attribute newAttr;
    
ID newID;
    
workload newWork;
    
arrivalPeriod newArrivalP;
}

int Customer::GetArrivalPeriod(double periodLength){
    
int arrivPeriod;   //arrival period of customer entering service
    
arrivPeriod int(ceil(attribute periodLength));
    return 
arrivPeriod;
}

//-------End of Customer Class-----------------------------------------

#endif 
dimbulb is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73