Java program to graph an entered function.