I'm trying to make a function that takes one of many classes that extends Foo
, and return a new instance of that object in its Class, not a new instance of Foo
.
I'm sure this is a common issue. Is there any good examples out there?
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?