//1st implementation public function out_av($v1, v2) { return 'The average of'.$v1.' and '.$v2.'is: '.calc_av($v1,$v2) } public function calc_av($v1, v2) { return ($v1+$v2)/2 } //2st implementation public function out_av($v1, v2) { return 'The average of'.$v1.' and '.$v2.'is: '.($v1+$v2)/2 }