best way to get data into a new instance?



Let's pretend I'm creating an Employee class, which I will later subclass for more specific jobs. Each instance will have stuff like a name, title, degrees held, etc. etc.

So I'm wondering, is the best way to get all this information into the object to just have a really long __init__ method that takes each argument?

Does a question like this depend on how the class will be used? I'm trying to construct it in a way that is independent of, say, the GUI interface that will be used, but I can't help but think that if all the data is entered into a GUI, then passed programmatically to the class, then it's no big deal because it happens behind the scenes. But if, for instance, someone manually created a new instance, they would have a ton of arguments to type in each time. Granted, even with the GUI they are basically typing in arguments, but in the manual case you'd have to type in the call to the class, the parentheses, commas, quotes around the strings, etc. (But still, I'm trying not to let a specific interface influence the construction of what should probably be a completely independent class implementation.)

Thanks.
.



Relevant Pages

  • Re: best way to get data into a new instance?
    ... I'm trying to construct it in a way that is independent of, say, the GUI interface that will be used, but I can't help but think that if all the data is entered into a GUI, then passed programmatically to the class, then it's no big deal because it happens behind the scenes. ... Granted, even with the GUI they are basically typing in arguments, but in the manual case you'd have to type in the call to the class, the parentheses, commas, quotes around the strings, etc. (But still, I'm trying not to let a specific interface influence the construction of what should probably be a completely independent class implementation.) ... I should just start coding like Fredrik suggested ages ago and find out the bad design ideas for myself. ...
    (comp.lang.python)
  • Re: Bill Gates = Robin Hood?
    ... Jobs did not have much of a hand in the matter. ... well beyond the PARC ideas before Jobs got involved at all, ... If it weren't for the Apple engineers manoevering Jobs like that, ... The Mac GUI was created *despite* Jobs, and - well, all you have to do ...
    (uk.comp.sys.mac)
  • Re: Incremental Backups.
    ... Did you create the jobs using the maint plan in the first place? ... If you don't want to use the GUI, I recommend scheduling the jobs yourself, as ordinary ... >> Change from full database backup to transaction log backup. ...
    (microsoft.public.sqlserver.server)
  • Re: Have fun with managing Data Protector schedules
    ... > schedule information) to automatically start backup jobs. ... The GUI would have to guess the rules from the current configuration. ...
    (comp.sys.hp.hpux)
  • Re: Bill Gates = Robin Hood?
    ... Jobs did not have much of a hand in the matter. ... If it weren't for the Apple engineers manoevering Jobs like that, ... The Mac GUI was created *despite* Jobs, and - well, all you have to do ... On the drive back to Cupertino, it is reported that Jobs told Atkinson to ...
    (uk.comp.sys.mac)