Search:

Type: Posts; User: TheMatrixMage

Search: Search took 0.22 seconds.

  1. Replies
    4
    Views
    1,390

    Re: Loop Character Replacement Issue

    Okay so is the problem that when it checks and replaces the value that it is not saving the value after? If so I'm a little confused on how to change it.

    The only restrictions are that I have to...
  2. Replies
    4
    Views
    1,390

    Loop Character Replacement Issue

    Hello, I'm just learning programming and in my Computer Science class have been told to use loops to perform several operations. However I am currently having issues with replacing all white spaces...
  3. Replies
    31
    Views
    2,652

    Re: Issues with return

    Awesome, got that part working :D
    So now I need to be able to send the coordinates to calculate every side of the polygon through sideLength1to2 and then have them use perimeter() directly after to...
  4. Replies
    31
    Views
    2,652

    Re: Issues with return

    Now how would I call upon translate from the initial code to shift all the coordinates left 3 and up 5?
  5. Replies
    31
    Views
    2,652

    Re: Issues with return

    Also now when I print testing I get the object label. I can change that using a toString method of some sort right? I want to get it to tell me the coordinates right back, but through printing the...
  6. Replies
    31
    Views
    2,652

    Re: Issues with return

    So my main should look something like

    import java.lang.Math;


    public class Rawr {
    private double x1;
    private double x2;
    private double x3;
    private double x4;
  7. Replies
    31
    Views
    2,652

    Re: Issues with return

    So are both of those going into my main class? or is one going into my tester? Also can you clarify on the usage of the test.setValues? the ... blah blah has got me a little :P
  8. Replies
    31
    Views
    2,652

    Re: Issues with return

    So add something like this to the main?

    public Rawr(double newX1, double newX2, double newX3, double newX4, double newY1, double newY2, double newY3, double newY4){
    x1 = newX1;
    x2 = newX2;...
  9. Replies
    31
    Views
    2,652

    Re: Issues with return

    I need to instantiate the polygon at particular points (the points just depend on the case and the previous ones supplied were random)
    Then I need to print the object used in the Tester Class
    I...
  10. Replies
    31
    Views
    2,652

    Re: Issues with return

    Ah but I'm supposed to default them to 0.
  11. Replies
    31
    Views
    2,652

    Re: Issues with return

    Ah yes, my apologies I have already done that. My question now is, as I have created a tester class to run off this one, in the tester class how would I go about instantiating an object (the polygon)...
  12. Replies
    31
    Views
    2,652

    Re: Issues with return

    You mean in the tester class I might start it off as?


    public class RawrTester {
    public static void main(String[] args){

    double x1 = 1;
    double x2 = 2;
    double x3 = 1;
    double x4 =...
  13. Replies
    31
    Views
    2,652

    Re: Issues with return

    Alright, well sorry to say I'm not fully understanding how I would manage this. I'll hopefully whip something up, thanks again.
  14. Replies
    31
    Views
    2,652

    Re: Issues with return

    Thank you so much for your help so far. Any hints now for my tester class (I established the s variables at the beginning of my main class). I'm having issues of thinking how to instantiate the...
  15. Replies
    31
    Views
    2,652

    Re: Issues with return

    If I used a Tester class to plug in values to retrieve the side lengths for that particular polygon, could they then be used for the perimeter?
  16. Replies
    31
    Views
    2,652

    Re: Issues with return

    In this case would it still pull the values obtained from sideLength1to2?
  17. Replies
    31
    Views
    2,652

    Re: Issues with return

    This is what I have thus far.

    import java.lang.Math;


    public class Rawr {
    private double x1;
    private double x2;
    private double x3;
    private double x4;
  18. Replies
    31
    Views
    2,652

    Issues with return

    Hello, I'm new to java and programming in general and am now in a CS110 course in college.

    Currently I am unsure how to fix my issues with return in this small bit of code:

    private void...
Results 1 to 18 of 18