Type test method new() Print "trara" endmethod function create:test() ' another variant of type creation print "trara2" return new test endfunction method create() ' this function can NOT create types / object! print "some operation on an existing type instance" endfunction endtype
methods can not be used to create types, they can only be applied to existing type instances.
so if you want to have an own creation function you need to use function with a return of the given type and to return that instance you will need to create it which needs "new".
So using a creation function makes only sense if you want to have a creation feature with input values, otherwise it is not needed as "default settings" can be done a overwriten "method new()" as you already did.
Your creation won't work, if you call "create" to create a station or sector you will get an error that there is no such identifier ( as type instance not created )
And your method "create" in station overwrites the original create. if you want to call the original one as well, you will need to use super.create