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.
Type: Posts; User: camel-man
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.
you will have to make your own method to tell you the coordinates. Something like
public String toString(){
return x1 +" " +x2 + " " +.... all the values.
}
that looks like it will work
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...
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,...
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...
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...
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.
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...
When you get stuck. Post your full code here. It makes it much easier to point you in the right direction.
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...
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....
What is your definition of pull?
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...
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...