Method and practice for instantiating classes that are inherited from