Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    8
    Views
    2,234

    [SOLVED] Re: Help with Classes/ Instance Methods

    Cool. What JJeng was saying is valid though, and it's not really an extra method. You'd simply be overriding an existing method, throwing in what you already have as the return statement, then...
  2. Replies
    8
    Views
    2,234

    [SOLVED] Re: Help with Classes/ Instance Methods

    I think the issue you're struggling with is what to do with the value returned from the midpoint function. You could do something like this:


    Point p1 = new Point();
    Point p2 = new Point();...
  3. Replies
    8
    Views
    2,234

    [SOLVED] Re: Help with Classes/ Instance Methods

    The problem is that Java doesn't "know" how to simply print a Point, so it prints out the stuff you posted (from Object's toString() method). You probably want to print out the actual x and y values...
  4. Replies
    8
    Views
    2,234

    [SOLVED] Re: Help with Classes/ Instance Methods

    I might be misunderstanding your requirements, but I don't see how your midPoint funciton corresponds to the midpoint formula. It looks like you're adding the x and y coordinates of one point,...
Results 1 to 4 of 4