Results 1 to 4 of 4
  1. #1
    jaxber is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default 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) );


    return result;

    qustion is how to use this method to draw this diagram

    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).

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    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.

  3. #3
    jaxber is offline Member
    Join Date
    Apr 2011
    Rep Power


    sorry,i am the new one,next time i won‘t write this title。sorry for that,please understand

  4. #4
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Richmond, Virginia
    Blog Entries
    Rep Power


    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

  1. Compiling probem "cannot find symbol"
    By thegluups in forum New To Java
    Replies: 27
    Last Post: 01-18-2010, 08:53 PM
  2. cannot find symbol for "list.addFirst"
    By alexbryan_08 in forum New To Java
    Replies: 10
    Last Post: 08-26-2009, 08:55 AM
  3. Reading strings with like "degree symbol" - HOW?
    By RR_QQ in forum New To Java
    Replies: 13
    Last Post: 02-18-2009, 02:16 AM
  4. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 12:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts