How to Create a Common Function Specific to Each Subclass

In my superclass, I wanted to add a common method called: setUp() but I want this function not to execute the same code depending on the subclass.

local SuperClass = {}

function SuperClass:extands(subClass)
	return setmetatable(subClass, {
		__index = self
	})
end

function SuperClass:setUp()
	
end


return SuperClass
local SubClass = {}

function SubClass:setUp()
	
end


return SubClass

you can use the concept of method overriding. When a subclass defines a method with the same name as a method in the superclass, the subclass method will override the superclass method.