I have classes Section_Input and Content_Input which are both dreived from an Input class. They both implement a method called delete.

The behviour of the delete method is dependant on the sub class from which it is being called. I.e: if the delete method is called from the section_input class then it instantiates a new object called Section and if the delete method of the Content_Input class is called is instantiates a content class.

At present I am setting a property in each sub class called Action_Class_Name, which holds the name of the class it should create when the deelete method is called. Is doing it this way bad practice? Should each subclass have its own delete mehtod?