New instance of class based on argument
<p>I'm trying to make a function that takes one of many classes that extends <code>Foo</code>, and return a new instance of that object in its Class, not a new instance of <code>Foo</code>. </p>

<p>I'm sure this is a common issue. Is there any good examples out there?</p>

<p>I have never used a class as an input parameter, only members of a class. Based on what I have searched for, this should be possible to do?</p>
