Which of the following dialogue is grammatically correct?

The little boy cried and screamed out "why can't I have that toy."
"The little boy cried and screamed out," why can't I have that toy.
"The little boy cried and screamed out, Why can't I have that toy," The little boy cried and screamed out, "Why can't I have that toy?"

The third option is grammatically correct:

"The little boy cried and screamed out, 'Why can't I have that toy?'"