Results 1 to 4 of 4
- 04-29-2011, 12:52 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
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;
}
}
qustion is how to use this method to draw this diagram

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.
Your program should also display the rough minimum and the maximum y values
encountered when plotting the graph. No additional search for minimum and
maximum y values should be performed. You must print the number of mathematical
function evaluations that you needed to plot the graph, as an indicator of the
efficiency of your code. You must always try to minimise this value as much as
possible. (Note: You cannot use arrays or similar data structures in this assignment).
-
Posted to help you get better help here:
Labeling your post as "urgent" is one sure fire way to get less help than you would otherwise. It suggests that you think that your post is more important than anyone else's. Well, it's not.
Next, please show your work and ask an actual question rather than just dumping your assignment whole into the forum.
- 04-29-2011, 01:03 AM #3
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
sorry,i am the new one,next time i won‘t write this title。sorry for that,please understand
- 04-29-2011, 01:08 AM #4
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
The next step is to explain it to us in your own words. Assume we are lazy(I actually am) and we don't want to sift through all that and figure out the design, then help. Help us help you. The easier you make it for us to understand, the more willing we are to help. You may also realize what to do just in explaining it.
Don't be afraid to re read the assignment multiple times, the more you understand it, the easier it will be to design.
Similar Threads
-
Compiling probem "cannot find symbol"
By thegluups in forum New To JavaReplies: 27Last Post: 01-18-2010, 08:53 PM -
cannot find symbol for "list.addFirst"
By alexbryan_08 in forum New To JavaReplies: 10Last Post: 08-26-2009, 08:55 AM -
Reading strings with like "degree symbol" - HOW?
By RR_QQ in forum New To JavaReplies: 13Last Post: 02-18-2009, 02:16 AM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM -
"Cannont find symbol Constructor" error
By Welsh in forum New To JavaReplies: 7Last Post: 01-25-2008, 12:12 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks