title: Gradually fill object (correct design?)
body: <h1>General Problem</h1>
  
  <p>I have some objects that have some variables that are not known at creation time.</p>
  
  <p>Right now I create these objects and gradually fill them until they are fully instantiated. But I'm wondering, "Is it a good design to gradually fill an object until it is fully instantiated?".</p>
  
  <h1>My Specific Problem</h1>
  
  <p>I'm developing a Java program that has a hierarchy of <em>Task</em> objects. These tasks have some variables that are known when I create them, and some variables that only become known when the task is being scheduled. Right now I create these tasks with the variables that are known, and when the task is ready for scheduling I call <em>scheduleTask(Task t)</em> and this method will set the variables that become known when the task is being scheduled.</p>
  
  <p>But is it a good solution to create objects that are not fully instantiated, and set the remaining variables when they become known?</p>
  
  <p>I was thinking about deferring the task creation until all variables are known (when it is being scheduled). But some taks can only be scheduled after getting an approval from external sources.</p>
  
  <p>Does somebody have some design ideas on how to solve this problem?</p>
  
  <p><em>EDIT</em>: I forgot to mention that I have different types of Tasks that all inherit from "Task".</p>
  
  <p><em>EDIT 2</em>: How about "ProposedTask" objects that have the variables that are known before scheduling? References to these can be hold until it gets approval. Then a new "Task" can be created while scheduling based upon the "ProposedTask" object ('scheduleTask(ProposedTask p)' now takes a ProposedTask object).</p>