I am new at c++ and this program is supposed to look at whether the customer is amazed, pleased, ect. but i can't figure it out....i need help asap...this is my code put there are alot of errors...
void compute_wait_time(int arrival[], int service[], int wait[], int );
int FindMin(int arr[]);
int FindMax(int arr[]);
int RangeWait(int max, int min);
double Mean(int wait[]);
double STD(const int wait[], double mean);
void computeFrus(double mean, double std, int wait[], int amazed=0, int pleased=0, int calm=0,
int irritated=0, int berserk=0);
void computeHisto (int amazed, int pleased, int calm, int irritated, int berserk, int i=0);
int main()
{
int arrival[ARRAY_SIZE],
service[ARRAY_SIZE],
wait[ARRAY_SIZE],
teller[ARRAY_SIZE],
max, min, range, sum;
double mean;
ifstream infile;
infile.open("bankSMALL.txt");
if(infile)
{
cout<< "File is Opened" << endl;
cout<< "ID Arrival Service Wait"<<endl;
}
else
{
cout<< "File Not Found"<< endl;
}
// read data
for (int i=0;i<ARRAY_SIZE;i++) {
infile >> teller[i];
infile >> arrival[i];
infile >> service[i];
}
void computeFrus(double mean, double std, int wait[], int amazed=0, int pleased=0, int calm=0,
int irritated=0, int berserk=0);
void computeHisto (int amazed, int pleased, int calm, int irritated, int berserk, int i=0);
return(0);
}
void compute_wait_time(int arrival[], int service[], int wait[], int ARRAY_SIZE)
{
int hours_arr, mins_arr, sec_arr, arrival_sec;
int hours_ser, mins_ser,sec_ser,service_sec;
min = arr[0];
for(int i=1; i<ARRAY_SIZE; i++)
{
current = arr[i];
if(current < min)
{
min = current;
}
}
return(min);
}
int FindMax(int arr[])
{
int current, max;
max = arr[0];
for (int i=1; i<ARRAY_SIZE; i++)
{
current = arr[i];
if(current > max)
{
max = current ;
}
}
return(max);
}
int RangeWait(int max, int min)
{
return (max - min);
}
double Mean(int wait[])
{
double mean;
int sum = 0;
for (int i=0; i<ARRAY_SIZE; i++)
{
sum = sum + wait[i];
}
mean = sum*1.0/ARRAY_SIZE;
//cout<< sum;
return(mean);
}
void computeFrus(double mean, double std, int wait[], int amazed=0, int pleased=0, int calm=0,
int irritated=0, int berserk=0)
{
for(int i=0; i<ARRAY_SIZE; i++)
{
if(wait[i] <= (mean - std))
{
amazed++;
}