Read the excerpt and not one word about HOW they switch from male to female and back.
how?
The genes control the growth and thus flower production