Which sentence uses correct punctuation?

A. “To change your life,” said William James, start immediately and do it flamboyantly.”

B. “If you get a hamster, you’ll be responsible for its care,” my mother told me.

C. Ms. Winters said, Do all of the math problems on page 98 for homework tonight.

D. “I hope I don’t have to go, Ron said, but if I do, I’ll try to have fun.”