Search:

Type: Posts; User: camel-man

Search: Search took 0.10 seconds.

  1. Replies
    31
    Views
    2,697

    Re: Issues with return

    You would call it like you do any other method. testing.translate();
    Although you need to give the shiftX and shiftY values . Right now in your Rawr class they do not have any.
  2. Replies
    31
    Views
    2,697

    Re: Issues with return

    you will have to make your own method to tell you the coordinates. Something like




    public String toString(){
    return x1 +" " +x2 + " " +.... all the values.

    }
  3. Replies
    31
    Views
    2,697

    Re: Issues with return

    that looks like it will work
  4. Replies
    31
    Views
    2,697

    Re: Issues with return

    the constructor is for you Rawr class. testing.setValues(1,2,3,4,56) are the values(I just put random numbers) you are wanting to use to set for your x and y values. You will call that in your main...
  5. Replies
    31
    Views
    2,697

    Re: Issues with return

    That's a constructor. So it can't be in your main. If you want to give x and y values you can make that into a method.

    public void setValues(double newX1, double newX2, double newX3, double newX4,...
  6. Replies
    31
    Views
    2,697

    Re: Issues with return

    start with one thing at a time. So you want to give the coordinates of the object after you create it in main correct? You will need to create a method that will supply the points you want for the...
  7. Replies
    31
    Views
    2,697

    Re: Issues with return

    You can have both constructors but I must be missing what you are trying to do then.

    So walk me through it here. You want to create an object of type Rawr in your tester class? What values do you...
  8. Replies
    31
    Views
    2,697

    Re: Issues with return

    Look up at my last post ( I edited in a little more)

    If you look at the constructor you can now pass in the values you want from the tester class.
  9. Replies
    31
    Views
    2,697

    Re: Issues with return

    I was referring to the rawr class where you would declare your S variables at the top like so.


    import java.lang.Math;


    public class Rawr {
    private double x1;
    private double x2;
    private...
  10. Replies
    31
    Views
    2,697

    Re: Issues with return

    When you get stuck. Post your full code here. It makes it much easier to point you in the right direction.
  11. Replies
    31
    Views
    2,697

    Re: Issues with return

    You should use some parameters in your constructor for the Rawr class. That way when you create the object in your main you can give it initial values that you like (1,2)(2,4)(1,6)(3,5). If I'm...
  12. Replies
    31
    Views
    2,697

    Re: Issues with return

    If you do one of the prior revisions I listed above than there shouldn't be a problem getting anything done. It depends on how you want to call your methods and in which way you plan on using them....
  13. Replies
    31
    Views
    2,697

    Re: Issues with return

    What is your definition of pull?
  14. Replies
    31
    Views
    2,697

    Re: Issues with return

    your perimeter method has no way of knowing what your S variables are. This is because you declare your S variables in your sideLength method, making them local to that function. One way you can fix...
  15. Replies
    31
    Views
    2,697

    Re: Issues with return

    The s variables are local to sideLength method and the method perimeter doesn't know what s1,s2... are.

    Post your full code, so i can give you further help. I would suggest making s variables...
Results 1 to 15 of 15