Which of these would be done if using top-down programming?

writing a function and then testing it
breaking a problem down into pieces
developing a test and then writing a function
creating program details first

breaking a problem down into pieces