Functions Pass By Reference, Pass By Value

For this assignment you will create and test PBR and PBV functions

Copy over all the files provided for you from 
/home/fac/msarr/public_files/cmps2020/hw/hw01 

write one function, test it then move onto the next one
save your self a lot of trouble and dont try to write all you stuff and then start to compile
you should rarely if ever edit more than 4 lines of code in between attempts to compile... if   you get errors fix them before proceeding.

if you need to comment out sections of your code to test it in your main do that.. one thing at a time so you dont get overwhelmed by a ton of compitation errors

dont put your funcitons obove the main in your main.cpp
they go in funtions.h

you will complete and test the functions defined in 

File: functions.h

#include "easylogging++.h"
#include "cmpslib19.h"

// put your function bodies here



// create a function  that RETURNS the middle (not average) value of 3 integer parameters

int	Function1( int a,int b,int c)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " << a <<","<< b <<"."<< c << endl;

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "returning:" << result << endl;
	return result;
}

// create a function  that RETURNS the middle value of 3 char parameters

// not average, the middle of the 3 values

char	Function2( char a,char b,char c)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;

}

// create a function  that determines the middle value of ( int )parameters 2,3 & 4

// STORE THAT VALUE into the 1st parameter

void Function3(int &result, int a,int b,int c)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " << result << "," << a << "," << b << "." << c << endl;

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "End Params: " << result << "," << a << "," << b << "." << c << endl;

}


// create a functions that determines the middle value of ( char ) parameters 2,3 & 4  

// STORE THAT VALUE into the 1st parameter

void Function4(char& result, char a,char b,char c)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " << result << "," << a << "," << b << "." << c << endl;

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "End Params: " << result << "," << a << "," << b << "." << c << endl;
}

// create a function that returns the sum of parameters 1,2,3,4 & 5 

double Function5(double a,double b,double c,double d,double e)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " << a << "," << b << "." << c << "," << d << "," << e << endl; 

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Returning: " << result << endl; 
	return result;
}

// create a function that determines the sum of parameters 2,3,4,5 & 6

// STORE THAT VALUE into the 1st parameter

void	Function6(double& result ,double a,double b,double c,double d,double e)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " << result << "," << a << "," << b << "." << c << "," << d << "," << e << endl; 

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "End Params: " << result << "," << a << "," << b << "." << c << "," << d << "," << e << endl; 

}

// create a functions that can sort parameters 1 ,2 ,3  in ascending order

// regardles of the values in the parameter before calling

// after calling the 1st parameter will contain the lowest value

// after calling the 2nd parameter will contain the middle value

// after calling the 3rd parameter will contain the highest value


void Function7(double& one , double& two, double& three)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " <<  one << "," << two  << "." << three << endl; 

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "End Params: " <<  one << "," << two  << "." << three << endl; 
}


// create a functions that can sort parameters 1 ,2 ,3  in descending order

// regardles of the values in the parameter before calling

// after calling the 1st parameter will contain the highest value

// after calling the 2nd parameter will contain the middle value

// after calling the 3rd parameter will contain the lowest value

void Function8(double& one, double& two, double& three)
{
  LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "Start Params: " <<  one << "," << two  << "." << three << endl; 

  LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
  LOG(INFO) << "End Params: " <<  one << "," << two  << "." << three << endl; 
}





functions.h -- put your complete functions here main1.cpp -- create a main to test that your functions do what they are supposed to do the one of the functions is done for you as well as the code to test it for full credit: 1. In the main you will need to test ALL of your functions and make sure they are correct 2. Test each of your functions by calling each one at least 3 times with disparate values 3. log the start and end of all functions at the VERY LEAST 4. Give each function a distinct name (no overloading) so that it is clear that you are testing every function 5. make sure your code compiles without warnings