Which of the following direct quotations is punctuated correctly?
My friend asked "when you go to the store can you pick up some coffee?"
My friend asked me to pick up some coffee when I go to the store.
"When you go to the store, can you pick up coffee" asked my friend.
"When you go to the store," my friend said, "can you please pick up some coffee?"