Expression evaluation, program that simulates the calculator function