Mostly, yes, except for knowing which subclass to instantiate. We could maybe store the class name along with the attributes and have a switch statement inside.