This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
There's so many things wrong here I don't know where to start. I would suggest starting over, write 3-5 lines of code, test it, and only when you're satisfied that they work, go on to doing another 3-5 lines of code, test that, and repeat. Concentrate on your Main class first before even starting on your Average class. You should start off with something like this. And then TEST it thoroughly.