This is an example of Definite assignment analysis - Wikipedia, the free encyclopedia

As a general rule, when a compiler error tells you something has not been done yet (in this case 'average'...