Search:

Type: Posts; User: curmudgeon

Search: Search took 0.08 seconds.

  1. Re: Inheritence and problems with static methods.

    Aren't you being a bit presumptuous here? Please explain how my advice was "over-shooting the mark". I told him basically the same thing in my first post if you'd take the time to read the whole...
  2. Re: Inheritence and problems with static methods.

    You're very welcome!
  3. Re: Inheritence and problems with static methods.

    ShippedOrder already has all of the non-static methods of Order. That's what inheritance is all about. Again please make the indicated method calls on the ShippedOrder object, not the Order object.
  4. Re: Inheritence and problems with static methods.

    Yes it should be, but what objects are you using mostly here?:



    // second half of main method
    ShippedOrder aShippedOrder = new ShippedOrder();...
  5. Re: Inheritence and problems with static methods.

    Check your UserOrder's main method again. Which object are you using in the second half of this method, the Order object or the ShippedOrder object. Check again.
  6. Re: Inheritence and problems with static methods.

    Again, have you changed the code in Order and ShippedOrder as I've recommended?
  7. Re: Inheritence and problems with static methods.

    Yep, you missed what I meant. Let me try again. You should have one class, Order, that has no static methods, no static fields, no static *anything*. You should have another class, ShippedOrder, that...
  8. Re: Inheritence and problems with static methods.

    If you're learning OOP principles, one of the first rules to learn is that you should avoid static anything except in very specific situations. Here your use of static methods are preventing...
Results 1 to 8 of 9