Guidewire Interview Question

In what ways you can create a function?