Java program that plots a sinusoidal function