How do I create a subobject from a variable class

The idea here is that there will be many different characters that all descend from ASubCharacter, and all of those characters will have a BasicAttack component that handles the API, but that BasicAttack component will be a different class inheriting from UCharacterAttack on every character.