Search:

Type: Posts; User: r0x

Search: Search took 0.10 seconds.

  1. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    big thanks for answers!!! so the polygone was created let's say in my way but there is still teacher's method (because he wanted to start off with the 2D array of endpoints), for now I don't...
  2. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    Have another question, I put the code straight away to be more clear

    ArrayList<Point><Line> points = new ArrayList<Point><Line>();

    Is it possible to put in the same ArrayList objects of...
  3. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    Thank you very much for explications!! This forum is cool \m/
  4. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    so the idea is that when I use System.out.println() this method needs toString to print the stuff ? and by default println takes Object's toString, am I right ?
  5. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    // Custom toString() Method.
    public String toString() {
    return "X=" + x + " " + "Y=" + y;
    }

    ok, so I need to write my own version of toString method ? so that after in Main it could be...
  6. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    the problem is that I have no idea what toString is, I heard about this but never understood :-/
    can u just write how can I see the contents of points ?
  7. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    public class Point {

    private double x;
    private double y;

    public Point(double x, double y) {
    this.x = x;
    this.y = y;
    }
  8. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    I got it ) thank you
  9. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    ok thanks but I changed to double
    so I was thinking may be an ArrayList would be a good choice so here is the code


    public class Point {

    private double x;
    private double y;

    public...
  10. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Re: Create a polygone

    ok


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

    float[][2] endpoints = { {2.7,5.4}, {1.1,2.8}, {1.9,1.3} };

    }
  11. Thread: Create a polygone

    by r0x
    Replies
    20
    Views
    3,318

    Create a polygone

    Hi all! My name is Dan and I'm first time here. Hope someone can help me with the task.
    The exercice is from my exam and it sounds like this:

    a) Define proper data structures to represent a...
Results 1 to 11 of 11