added calculate and print final table functions to calculator.js