Get Methods and GUI

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

31 Replies - 2315 Views - Last Post: 23 June 2009 - 05:12 PM Rate Topic: -----

#31 Galnoth  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 14-June 09

Re: Get Methods and GUI

Posted 23 June 2009 - 09:54 AM

View Postnick2price, on 22 Jun, 2009 - 08:05 PM, said:

Anywhere it cant find it in Product class, this means you dont have a get method for that in your Product class. This means you will have to go back to your Product class and add the get methods like how you have your other get methods in there.
As not not being able to display int or double, or you need to do is cast them to a String. Pretty straight forward.
And the invoke thing in your main just calls instantiates the constructor of your gui class. Its quite a common way of doing it in gui applications.


If I am supposed to add the methods into my Product class, this is going to make DVD class obsolete if I have to put all that info into Product class. Is that what you are suggesting? I'm not sure how I would keep using my DVD class and the Product class both, or if I can?
Was This Post Helpful? 0
  • +
  • -

#32 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Get Methods and GUI

Posted 23 June 2009 - 05:12 PM

All you will be doing is adding standard get methods in your Product class. Your DVD class will inherit these methods as you are extending the Product class. You cant call methods which you havnt created, which is what you are currently trying to do.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3