Urgent! How to display this function,use symbol"*" to draw line


Here teacher gave one method to perform this function

public static long evaluations;

public static double func(double x)
{
double result;

result = Math.abs( Math.sin(0.017453292519943295769236907684886*x) * (x/90) );

evaluations++;

return result;
}
}

question is how to use this method to draw this diagram

picture:
http://simpleface.files.wordpress.com/2011/04/screen-shot-2011-04-29-at-9-41-54-am.png

Menu:
The menu has the following 3 options:
[1] Display function
[2] Find x-value
[3] Exit
Option 1 lets the user roughly visualise the function on the terminal/console screen.
Option 2 lets the user search for a particular input value at which a specified output
value can be achieved. (See below for full descriptions of these options.) The program
can only be finished when the user selects option 3. Erroneous input should also not
be accepted at any stage.
Display function option:
When this option is selected, the user is allowed to enter an x value range and an
output width and a height. The program should then ensure that the portion of the
function that is chosen (through the x value range) correctly fits the specified
rectangular width and height.

Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.

Nobody here will do this for you. Make a start and come back here if you get stuck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.